StompWiseAgentTransport
Bases: WiseAgentTransport
A transport for sending messages between agents using the STOMP protocol.
Source code in wiseagents/transports/stomp.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
agent_name: str
property
Get the agent name.
host: str
property
Get the host.
port: int
property
Get the port.
request_queue: str
property
Get the request queue.
response_queue: str
property
Get the response queue.
__getstate__()
Return the state of the transport. Removing the instance variable chain to avoid it is serialized/deserialized by pyyaml.
Source code in wiseagents/transports/stomp.py
73 74 75 76 77 78 |
|
__init__(host, port, agent_name)
Initialize the transport.
Parameters: |
|
---|
Source code in wiseagents/transports/stomp.py
58 59 60 61 62 63 64 65 66 67 |
|
send_request(message, dest_agent_name)
Send a request message to an agent.
Parameters: |
|
---|
Source code in wiseagents/transports/stomp.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
send_response(message, dest_agent_name)
Send a response message to an agent.
Parameters: |
|
---|
Source code in wiseagents/transports/stomp.py
118 119 120 121 122 123 124 125 126 127 128 |
|
start()
Start the transport. require the environment variables STOMP_USER and STOMP_PASSWORD to be set
Source code in wiseagents/transports/stomp.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
stop()
Stop the transport.
Source code in wiseagents/transports/stomp.py
130 131 132 133 134 135 136 137 138 139 140 141 |
|
WiseAgentRequestQueueListener
Bases: ConnectionListener
A listener for the request queue.
Source code in wiseagents/transports/stomp.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
__init__(transport)
Initialize the listener.
Args:
Source code in wiseagents/transports/stomp.py
14 15 16 17 18 19 |
|
on_error(error)
Handle an error.
Source code in wiseagents/transports/stomp.py
25 26 27 |
|
on_event(event)
Handle an event.
Source code in wiseagents/transports/stomp.py
21 22 23 |
|
on_message(message)
Handle a message.
Source code in wiseagents/transports/stomp.py
29 30 31 |
|
WiseAgentResponseQueueListener
Bases: ConnectionListener
A listener for the response queue.
Source code in wiseagents/transports/stomp.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
__init__(transport)
Initialize the listener.
Parameters: |
|
---|
Source code in wiseagents/transports/stomp.py
35 36 37 38 39 40 |
|
on_error(error)
Handle an error.
Source code in wiseagents/transports/stomp.py
42 43 44 |
|
on_message(message)
Handle a message.
Source code in wiseagents/transports/stomp.py
46 47 48 |
|