Home | Trees | Indices | Help |
|
---|
|
object --+ | Agent
Message broker.
The message broker that encapsulates physical channel management, incoming and outgoing message queues, listeners and resource management.
A single agent object can manage many listeners, which are responsible for accepting remote connections, and many incoming and outgoing connections.
The agent objects can be created and destroyed without constraints on the stack, on the free store or as static objects.
The objects of this class can be safely used by multiple threads.
Nested Classes | |
OptionNames |
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Class Variables | |
NEW_INCOMING_CONNECTION = 1
|
|
NEW_OUTGOING_CONNECTION = 2
|
|
CONNECTION_CLOSED = 3
|
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
Deallocates internal resources associated with this object. This function is called automatically if the object is used as a context manager. |
Adds new listener. Adds a new listener for the given target address. The supported target formats are:
The port for TCP/IP and UDP protocols can be 0 or *, in which case the actual port number is assigned by the system. |
Removes existing listener. Removes the listener denoted by its actual target name. Note that the actual target name might be different from the name provided when the listener was created, due to target resolution. The name which should be used for listener removal is the name that is returned by the add_listener function. |
Registers the new logical destination object. Registers the new "object" that can be a logical destination for incoming messages. |
Unregisters the logical destination object. It is permitted to request unregistration for an object that does not exist - such operation has no effect. Note: Due to performance and design tradeoffs it is not guaranteed that no more messages will be ever dispatched to the given object when this function returns. In fact, some of the messages that have been received by agent and not yet dispatched might be still dispatched shortly after this function returns. Only those messages that are received by agent after this function returns are guaranteed not to be dispatched to the unregistered object. This might be particularly important with regard to the lifetime of the callable entity that was provided when the given object has been registered. |
Opens the new connection. Opens the new channel or does nothing if the channel already exists. This function is not necessary with automatic connection recovery option in send and send_one_way. |
Sends the new outgoing message. Sends the new outgoing message to the given destination. Note: This function implicitly opens a new communication channel if it is not already open. This channel is kept open until it is explicitly closed (see the close_connection function) or until the agent is destroyed or the communication error is detected. |
Sends the new outgoing message. Sends the new outgoing message to the given destination, without the possibility to track its progress. See the description and notes for the send function. |
Closes the given communication channel. Closes the channel identified by name. The priority allows to properly handle the existing outgoing messages that are waiting in the outgoing queue for transmission. The existing messages with lower priority are abandoned, whereas the existing messages with priority equal or higher to the one provided as parameter are retained in the outgoing queue and are properly pushed for transmission before the channel is physically closed. The channel is closed immediately only if there are no messages waiting in its outgoing queue. |
Immediately closes the given communication channel. Closes the channel identified by name. The channel is closed immediately and those messages that are waiting in its outgoing queue are abandoned. Integrity of the message that was already partly transmitted is not guaranteed. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jul 10 23:12:18 2015 | http://epydoc.sourceforge.net |