C# Класс NetMQ.Core.ZObject

This is the base-class for all objects that participate in inter-thread communication.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ChooseIOThread NetMQ.Core.IOThread
FindEndpoint Ctx.Endpoint
SendCommand void

Открытые методы

Метод Описание
ProcessCommand ( [ cmd ) : void

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
ChooseIOThread ( long affinity ) : NetMQ.Core.IOThread
FindEndpoint ( [ addr ) : Ctx.Endpoint
SendCommand ( [ cmd ) : void

Send the given Command, on that commands Destination thread.

Описание методов

DestroySocket() защищенный Метод

protected DestroySocket ( [ socket ) : void
socket [
Результат void

ProcessActivateRead() защищенный Метод

Not supported on the ZObject class.
protected ProcessActivateRead ( ) : void
Результат void

ProcessActivateWrite() защищенный Метод

Not supported on the ZObject class.
protected ProcessActivateWrite ( long msgsRead ) : void
msgsRead long
Результат void

ProcessAttach() защищенный Метод

Not supported on the ZObject class.
protected ProcessAttach ( [ engine ) : void
engine [
Результат void

ProcessBind() защищенный Метод

Process the bind command with the given pipe.
Not supported on the ZObject class.
protected ProcessBind ( [ pipe ) : void
pipe [
Результат void

ProcessCommand() публичный Метод

public ProcessCommand ( [ cmd ) : void
cmd [
Результат void

ProcessForceStop() защищенный Метод

Not supported on the ZObject class.
protected ProcessForceStop ( ) : void
Результат void

ProcessHiccup() защищенный Метод

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
Результат void

ProcessOwn() защищенный Метод

Not supported on the ZObject class.
protected ProcessOwn ( [ obj ) : void
obj [
Результат void

ProcessPipeTerm() защищенный Метод

Process the terminate-pipe command.
Not supported on the ZObject class.
protected ProcessPipeTerm ( ) : void
Результат void

ProcessPipeTermAck() защищенный Метод

Process the terminate-pipe acknowledgement command.
Not supported on the ZObject class.
protected ProcessPipeTermAck ( ) : void
Результат void

ProcessPlug() защищенный Метод

Not supported on the ZObject class.
protected ProcessPlug ( ) : void
Результат void

ProcessReap() защищенный Метод

protected ProcessReap ( [ socket ) : void
socket [
Результат void

ProcessReaped() защищенный Метод

Not supported on the ZObject class.
protected ProcessReaped ( ) : void
Результат void

ProcessSeqnum() защищенный Метод

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
Результат void

ProcessStop() защищенный Метод

Not supported on the ZObject class.
protected ProcessStop ( ) : void
Результат void

ProcessTerm() защищенный Метод

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.
Результат void

ProcessTermAck() защищенный Метод

Process the termination-acknowledgement command.
Not supported on the ZObject class.
protected ProcessTermAck ( ) : void
Результат void

ProcessTermReq() защищенный Метод

Process a termination-request command on the Own object.
Not supported on the ZObject class.
protected ProcessTermReq ( [ obj ) : void
obj [
Результат void

RegisterEndpoint() защищенный Метод

protected RegisterEndpoint ( [ addr, [ endpoint ) : bool
addr [
endpoint [
Результат bool

SendActivateRead() защищенный Метод

protected SendActivateRead ( [ destination ) : void
destination [
Результат void

SendActivateWrite() защищенный Метод

protected SendActivateWrite ( [ destination, long msgsRead ) : void
destination [
msgsRead long
Результат void

SendAttach() защищенный Метод

Send the Attach command
protected SendAttach ( [ destination, [ engine, bool incSeqnum = true ) : void
destination [ the Own to send the command to
engine [
incSeqnum bool
Результат void

SendBind() защищенный Метод

Send the Bind command
protected SendBind ( [ destination, [ pipe, bool incSeqnum = true ) : void
destination [
pipe [
incSeqnum bool
Результат void

SendDone() защищенный Метод

Send a Done command to the Ctx itself (null destination).
protected SendDone ( ) : void
Результат void

SendForceStop() защищенный Метод

protected SendForceStop ( ) : void
Результат void

SendHiccup() защищенный Метод

protected SendHiccup ( [ destination, [ pipe ) : void
destination [
pipe [
Результат void

SendOwn() защищенный Метод

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
Результат void

SendPipeTerm() защищенный Метод

protected SendPipeTerm ( [ destination ) : void
destination [
Результат void

SendPipeTermAck() защищенный Метод

protected SendPipeTermAck ( [ destination ) : void
destination [
Результат void

SendPlug() защищенный Метод

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)
Результат void

SendReap() защищенный Метод

protected SendReap ( [ socket ) : void
socket [
Результат void

SendReaped() защищенный Метод

protected SendReaped ( ) : void
Результат void

SendStop() защищенный Метод

Send the Stop command.
protected SendStop ( ) : void
Результат void

SendTerm() защищенный Метод

protected SendTerm ( [ destination, int linger ) : void
destination [
linger int
Результат void

SendTermAck() защищенный Метод

protected SendTermAck ( [ destination ) : void
destination [
Результат void

SendTermReq() защищенный Метод

For owned objects, asks the owner (destination) to terminate obj.
protected SendTermReq ( [ destination, [ obj ) : void
destination [
obj [
Результат void

UnregisterEndpoint() защищенный Метод

protected UnregisterEndpoint ( [ addr, [ socket ) : bool
addr [
socket [
Результат bool

UnregisterEndpoints() защищенный Метод

protected UnregisterEndpoints ( [ socket ) : void
socket [
Результат void

ZObject() защищенный Метод

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
Результат System

ZObject() защищенный Метод

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
Результат System