C# Class NetMQ.Core.ZObject

This is the base-class for all objects that participate in inter-thread communication.
ファイルを表示 Open project: NetMQ/NetMQ3-x Class Usage Examples

Private Properties

Property Type Description
ChooseIOThread NetMQ.Core.IOThread
FindEndpoint Ctx.Endpoint
SendCommand void

Public Methods

Method Description
ProcessCommand ( [ cmd ) : void

Protected Methods

Method Description
DestroySocket ( [ socket ) : void
ProcessActivateRead ( ) : void
ProcessActivateWrite ( long msgsRead ) : void
ProcessAttach ( [ engine ) : void
ProcessBind ( [ pipe ) : void

Process the bind command with the given pipe.

ProcessForceStop ( ) : void
ProcessHiccup ( [ pipe ) : void

This method would be called to assign the specified pipe as a replacement for the outbound pipe that was being used. This, is an abstract method that is to be overridden by subclasses to provide their own concrete implementation.

A "Hiccup" occurs when an outbound pipe experiences something like a transient disconnect or for whatever other reason is no longer available for writing to.

ProcessOwn ( [ obj ) : void
ProcessPipeTerm ( ) : void

Process the terminate-pipe command.

ProcessPipeTermAck ( ) : void

Process the terminate-pipe acknowledgement command.

ProcessPlug ( ) : void
ProcessReap ( [ socket ) : void
ProcessReaped ( ) : void
ProcessSeqnum ( ) : void

Special handler called after a command that requires a seqnum was processed. The implementation should catch up with its counter of processed commands here.

ProcessStop ( ) : void
ProcessTerm ( int linger ) : void

Process a termination request.

ProcessTermAck ( ) : void

Process the termination-acknowledgement command.

ProcessTermReq ( [ obj ) : void

Process a termination-request command on the Own object.

RegisterEndpoint ( [ addr, [ endpoint ) : bool
SendActivateRead ( [ destination ) : void
SendActivateWrite ( [ destination, long msgsRead ) : void
SendAttach ( [ destination, [ engine, bool incSeqnum = true ) : void

Send the Attach command

SendBind ( [ destination, [ pipe, bool incSeqnum = true ) : void

Send the Bind command

SendDone ( ) : void

Send a Done command to the Ctx itself (null destination).

SendForceStop ( ) : void
SendHiccup ( [ destination, [ pipe ) : void
SendOwn ( [ destination, [ obj ) : void

Send the Own command, and increment the sequence-number of the destination

SendPipeTerm ( [ destination ) : void
SendPipeTermAck ( [ destination ) : void
SendPlug ( [ destination, bool incSeqnum = true ) : void

Send the Plug command, incrementing the destinations sequence-number if incSeqnum is true.

SendReap ( [ socket ) : void
SendReaped ( ) : void
SendStop ( ) : void

Send the Stop command.

SendTerm ( [ destination, int linger ) : void
SendTermAck ( [ destination ) : void
SendTermReq ( [ destination, [ obj ) : void

For owned objects, asks the owner (destination) to terminate obj.

UnregisterEndpoint ( [ addr, [ socket ) : bool
UnregisterEndpoints ( [ socket ) : void
ZObject ( [ parent ) : System

Create a new ZObject that has the same context and thread-id as the given parent-ZObject.

ZObject ( [ ctx, int threadId ) : System

Create a new ZObject with the given context and thread-id.

Private Methods

Method Description
ChooseIOThread ( long affinity ) : NetMQ.Core.IOThread
FindEndpoint ( [ addr ) : Ctx.Endpoint
SendCommand ( [ cmd ) : void

Send the given Command, on that commands Destination thread.

Method Details

DestroySocket() protected method

protected DestroySocket ( [ socket ) : void
socket [
return void

ProcessActivateRead() protected method

Not supported on the ZObject class.
protected ProcessActivateRead ( ) : void
return void

ProcessActivateWrite() protected method

Not supported on the ZObject class.
protected ProcessActivateWrite ( long msgsRead ) : void
msgsRead long
return void

ProcessAttach() protected method

Not supported on the ZObject class.
protected ProcessAttach ( [ engine ) : void
engine [
return void

ProcessBind() protected method

Process the bind command with the given pipe.
Not supported on the ZObject class.
protected ProcessBind ( [ pipe ) : void
pipe [
return void

ProcessCommand() public method

public ProcessCommand ( [ cmd ) : void
cmd [
return void

ProcessForceStop() protected method

Not supported on the ZObject class.
protected ProcessForceStop ( ) : void
return void

ProcessHiccup() protected method

This method would be called to assign the specified pipe as a replacement for the outbound pipe that was being used. This, is an abstract method that is to be overridden by subclasses to provide their own concrete implementation.
A "Hiccup" occurs when an outbound pipe experiences something like a transient disconnect or for whatever other reason is no longer available for writing to.
No supported on the ZObject class.
protected ProcessHiccup ( [ pipe ) : void
pipe [ the pipe to use for writing
return void

ProcessOwn() protected method

Not supported on the ZObject class.
protected ProcessOwn ( [ obj ) : void
obj [
return void

ProcessPipeTerm() protected method

Process the terminate-pipe command.
Not supported on the ZObject class.
protected ProcessPipeTerm ( ) : void
return void

ProcessPipeTermAck() protected method

Process the terminate-pipe acknowledgement command.
Not supported on the ZObject class.
protected ProcessPipeTermAck ( ) : void
return void

ProcessPlug() protected method

Not supported on the ZObject class.
protected ProcessPlug ( ) : void
return void

ProcessReap() protected method

protected ProcessReap ( [ socket ) : void
socket [
return void

ProcessReaped() protected method

Not supported on the ZObject class.
protected ProcessReaped ( ) : void
return void

ProcessSeqnum() protected method

Special handler called after a command that requires a seqnum was processed. The implementation should catch up with its counter of processed commands here.
Not supported on the ZObject class.
protected ProcessSeqnum ( ) : void
return void

ProcessStop() protected method

Not supported on the ZObject class.
protected ProcessStop ( ) : void
return void

ProcessTerm() protected method

Process a termination request.
Not supported on the ZObject class.
protected ProcessTerm ( int linger ) : void
linger int a time (in milliseconds) for this to linger before actually going away. -1 means infinite.
return void

ProcessTermAck() protected method

Process the termination-acknowledgement command.
Not supported on the ZObject class.
protected ProcessTermAck ( ) : void
return void

ProcessTermReq() protected method

Process a termination-request command on the Own object.
Not supported on the ZObject class.
protected ProcessTermReq ( [ obj ) : void
obj [
return void

RegisterEndpoint() protected method

protected RegisterEndpoint ( [ addr, [ endpoint ) : bool
addr [
endpoint [
return bool

SendActivateRead() protected method

protected SendActivateRead ( [ destination ) : void
destination [
return void

SendActivateWrite() protected method

protected SendActivateWrite ( [ destination, long msgsRead ) : void
destination [
msgsRead long
return void

SendAttach() protected method

Send the Attach command
protected SendAttach ( [ destination, [ engine, bool incSeqnum = true ) : void
destination [ the Own to send the command to
engine [
incSeqnum bool
return void

SendBind() protected method

Send the Bind command
protected SendBind ( [ destination, [ pipe, bool incSeqnum = true ) : void
destination [
pipe [
incSeqnum bool
return void

SendDone() protected method

Send a Done command to the Ctx itself (null destination).
protected SendDone ( ) : void
return void

SendForceStop() protected method

protected SendForceStop ( ) : void
return void

SendHiccup() protected method

protected SendHiccup ( [ destination, [ pipe ) : void
destination [
pipe [
return void

SendOwn() protected method

Send the Own command, and increment the sequence-number of the destination
protected SendOwn ( [ destination, [ obj ) : void
destination [ the Own to send the command to
obj [ the object to Own
return void

SendPipeTerm() protected method

protected SendPipeTerm ( [ destination ) : void
destination [
return void

SendPipeTermAck() protected method

protected SendPipeTermAck ( [ destination ) : void
destination [
return void

SendPlug() protected method

Send the Plug command, incrementing the destinations sequence-number if incSeqnum is true.
protected SendPlug ( [ destination, bool incSeqnum = true ) : void
destination [ the Own to send the command to
incSeqnum bool a flag that dictates whether to increment the sequence-number on the destination (optional - defaults to false)
return void

SendReap() protected method

protected SendReap ( [ socket ) : void
socket [
return void

SendReaped() protected method

protected SendReaped ( ) : void
return void

SendStop() protected method

Send the Stop command.
protected SendStop ( ) : void
return void

SendTerm() protected method

protected SendTerm ( [ destination, int linger ) : void
destination [
linger int
return void

SendTermAck() protected method

protected SendTermAck ( [ destination ) : void
destination [
return void

SendTermReq() protected method

For owned objects, asks the owner (destination) to terminate obj.
protected SendTermReq ( [ destination, [ obj ) : void
destination [
obj [
return void

UnregisterEndpoint() protected method

protected UnregisterEndpoint ( [ addr, [ socket ) : bool
addr [
socket [
return bool

UnregisterEndpoints() protected method

protected UnregisterEndpoints ( [ socket ) : void
socket [
return void

ZObject() protected method

Create a new ZObject that has the same context and thread-id as the given parent-ZObject.
protected ZObject ( [ parent ) : System
parent [ another ZObject that provides the context and thread-id for this one
return System

ZObject() protected method

Create a new ZObject with the given context and thread-id.
protected ZObject ( [ ctx, int threadId ) : System
ctx [ the context for the new ZObject to live within
threadId int the integer thread-id for the new ZObject to be associated with
return System