Package ClusterShell :: Package Worker :: Module EngineClient :: Class EnginePort
[hide private]
[frames] | no frames]

Class EnginePort

source code


An EnginePort is an abstraction object to deliver messages reliably between tasks.

Nested Classes [hide private]
  _Msg
Private class representing a port message.
Instance Methods [hide private]
 
__init__(self, task, handler=None, autoclose=False)
Initialize EnginePort object.
source code
 
_start(self)
Starts client and returns client instance as a convenience.
source code
 
_close(self, force, timeout)
Close port pipes.
source code
 
_read(self, size=4096)
Read data from pipe.
source code
 
_handle_read(self)
Handle a read notification.
source code
 
msg(self, send_msg, send_once=False)
Port message send with optional reply.
source code
 
msg_send(self, send_msg)
Port message send-once method (no reply).
source code

Inherited from EngineClient: error_fileno, reader_fileno, writer_fileno

Inherited from Engine.Engine.EngineBaseTimer: invalidate, is_valid, set_nextfire

Inherited from Engine.Engine.EngineBaseTimer (private): _set_engine

Method Details [hide private]

__init__(self, task, handler=None, autoclose=False)
(Constructor)

source code 

Initialize EnginePort object.

Overrides: Engine.Engine.EngineBaseTimer.__init__

_start(self)

source code 

Starts client and returns client instance as a convenience. Derived classes (except EnginePort) must implement.

Overrides: EngineClient._start
(inherited documentation)

_close(self, force, timeout)

source code 

Close port pipes.

Overrides: EngineClient._close

_read(self, size=4096)

source code 

Read data from pipe.

Overrides: EngineClient._read

_handle_read(self)

source code 

Handle a read notification. Called by the engine as the result of an event indicating that a read is available.

Overrides: EngineClient._handle_read