Package brisa :: Package upnp :: Package device :: Module event :: Class EventMessage
[hide private]
[frames] | no frames]

Class EventMessage

source code

Wrapper for an event message.

Instance Methods [hide private]
 
__init__(self, subscriber, variables, event_delay, cargo)
Constructor for the EventMessage class.
source code
 
_build_message_body(self, variables) source code
boolean
error(self, cargo, error)
Callback for receiving an error.
source code
boolean
response(self, http_response, cargo)
Callback for receiving the HTTP response on a successful HTTP call.
source code
Method Details [hide private]

__init__(self, subscriber, variables, event_delay, cargo)
(Constructor)

source code 

Constructor for the EventMessage class.

Parameters:
  • subscriber (Subscriber) - subscriber that will receive the message
  • variables (dict) - variables of the event
  • event_delay (float) - delay to wait before sending the event
  • cargo - callback parameters

error(self, cargo, error)

source code 

Callback for receiving an error.

Parameters:
  • cargo - callback parameters passed at construction
  • error (Exception) - exception raised
Returns: boolean

response(self, http_response, cargo)

source code 

Callback for receiving the HTTP response on a successful HTTP call.

Parameters:
  • http_response (HTTPResponse) - response object
  • cargo - callback parameters passed at construction
Returns: boolean