LMIIndicationListener.LMIIndicationHandler(request, client_address, server)[source]¶Class representing indication handler. The class is derived from
BaseHTTPRequestHandler, because the indications are transported by http
protocol, and from ThreadingMixIn; the indication listener is designed as
concurrent server to properly handle each incoming indication.
do_POST()[source]¶Overridden method, which is called, when a indication is received. It parses the indication message and searches for a matching handler for the indication name. Each subscribed indication should have it’s Destination set something similar:
<schema>://<destination>/<indication_name>
where the indication_name is a string, which properly defines the indication.
LMIIndicationListener.LMIIndicationHandlerCallback(callback, *args, **kwargs)[source]¶Helper class, which stores indication handler callback with its arguments and keyword arguments.
| Parameters: |
|
|---|
LMIIndicationListener.LMIIndicationListener(hostname, port, certfile=None, keyfile=None)[source]¶Class representing indication listener, which provides a unified API for the server startup and shutdown and for registering an indication handler.
| Parameters: |
|
|---|
add_handler(handler_name_pattern, handler, *args, **kwargs)[source]¶Registers a handler into the indication listener. Returns a string, which is used for the indication recognition, when a message arrives.
| Parameters: |
|
|---|---|
| Returns: | handler unique name |
| Return type: | string |
hostname¶| Returns: | hostname or address, where the indication listener is waiting for messages |
|---|---|
| Return type: | string |
is_alive¶| Returns: | flag indicating, if the indication listener is running |
|---|---|
| Return type: | bool |
port¶| Returns: | port, where the indication listener is waiting for messages |
|---|---|
| Return type: | int |
remove_handler(name)[source]¶Removes a specified handler from the indication listener database.
| Parameters: | name (string) – indication name; returned by
LMIIndicationListener.add_handler() |
|---|