Package pyamf :: Package flex :: Module messaging :: Class AbstractMessage
[hide private]
[frames] | no frames]

Class AbstractMessage

source code


Abstract base class for all Flex messages.

Messages have two customizable sections; headers and data. The headers property provides access to specialized meta information for a specific message instance. The data property contains the instance specific data that needs to be delivered and processed by the decoder.


See Also: AbstractMessage on Livedocs (external)

Nested Classes [hide private]
  __amf__
Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
decodeSmallAttribute(self, attr, input) source code
 
encodeSmallAttribute(self, attr) source code
 
__readamf__(self, input) source code
 
__writeamf__(self, output) source code
 
getSmallMessage(self)
Return a ISmallMessage representation of this object.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]
  DESTINATION_CLIENT_ID_HEADER = 'DSDstClientId'
Each message pushed from the server will contain this header identifying the client that will receive the message.
  ENDPOINT_HEADER = 'DSEndpoint'
Messages are tagged with the endpoint id for the channel they are sent over.
  REMOTE_CREDENTIALS_HEADER = 'DSRemoteCredentials'
Messages that need to set remote credentials for a destination carry the Base64 encoded credentials in this header.
  REQUEST_TIMEOUT_HEADER = 'DSRequestTimeout'
The request timeout value is set on outbound messages by services or channels and the value controls how long the responder will wait for an acknowledgement, result or fault response for the message before timing out the request.
  SMALL_ATTRIBUTE_FLAGS = [1, 2, 4, 8, 16, 32, 64]
  SMALL_ATTRIBUTES = {1: 'body', 2: 'clientId', 4: 'destination'...
  SMALL_UUID_FLAGS = [1, 2]
  SMALL_UUIDS = {1: 'clientId', 2: 'messageId'}
Instance Variables [hide private]
mixed body
Specific data that needs to be delivered to the remote destination.
str clientId
Indicates which client sent the message.
str destination
Message destination.
dict headers
Message headers.
str messageId
Unique Message ID.
int timeToLive
How long the message should be considered valid and deliverable.
int timestamp
Timestamp when the message was generated.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

decodeSmallAttribute(self, attr, input)

source code 

Since: 0.5

encodeSmallAttribute(self, attr)

source code 

Since: 0.5

getSmallMessage(self)

source code 

Return a ISmallMessage representation of this object. If one is not available, NotImplementedError will be raised.

Since: 0.5


Class Variable Details [hide private]

SMALL_ATTRIBUTES

Value:
{1: 'body',
 2: 'clientId',
 4: 'destination',
 8: 'headers',
 16: 'messageId',
 32: 'timestamp',
 64: 'timeToLive'}

Instance Variable Details [hide private]

headers

Message headers. Core header names start with DS.
Type:
dict