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

Class EngineClient

source code


Abstract class EngineClient.

Instance Methods [hide private]
 
__init__(self, worker, stderr, timeout, autoclose)
Initializer.
source code
 
_fire(self)
Fire timeout timer.
source code
 
_start(self)
Starts client and returns client instance as a convenience.
source code
 
error_fileno(self)
Return the standard error reader file descriptor as an integer.
source code
 
reader_fileno(self)
Return the reader file descriptor as an integer.
source code
 
writer_fileno(self)
Return the writer file descriptor as an integer.
source code
 
_close(self, force, timeout)
Close client.
source code
 
_set_reading(self)
Set reading state.
source code
 
_set_reading_error(self)
Set error reading state.
source code
 
_set_writing(self)
Set writing state.
source code
 
_read(self, size=-1)
Read data from process.
source code
 
_readerr(self, size=-1)
Read error data from process.
source code
 
_handle_read(self)
Handle a read notification.
source code
 
_handle_error(self)
Handle a stderr read notification.
source code
 
_handle_write(self)
Handle a write notification.
source code
 
_exec_nonblock(self, commandlist, shell=False, env=None)
Utility method to launch a command with stdin/stdout file descriptors configured in non-blocking mode.
source code
 
_readlines(self)
Utility method to read client lines
source code
 
_readerrlines(self)
Utility method to read client lines
source code
 
_write(self, buf)
Add some data to be written to the client.
source code
 
_set_write_eof(self) source code
 
_close_writer(self) source code

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

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

Method Details [hide private]

__init__(self, worker, stderr, timeout, autoclose)
(Constructor)

source code 

Initializer. Should be called from derived classes.

Overrides: Engine.Engine.EngineBaseTimer.__init__

_fire(self)

source code 

Fire timeout timer.

Overrides: Engine.Engine.EngineBaseTimer._fire

_start(self)

source code 

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

_close(self, force, timeout)

source code 

Close client. Called by the engine after client has been unregistered. This method should handle all termination types (normal, forced or on timeout). Derived classes must implement.

_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.

_handle_error(self)

source code 

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

_handle_write(self)

source code 

Handle a write notification. Called by the engine as the result of an event indicating that a write can be performed now.