aries_cloudagent.transport.inbound package

Submodules

aries_cloudagent.transport.inbound.base module

aries_cloudagent.transport.inbound.delivery_queue module

The Delivery Queue.

The delivery queue holds and manages messages that have not yet been delivered to their intended destination.

class aries_cloudagent.transport.inbound.delivery_queue.DeliveryQueue[source]

Bases: object

DeliveryQueue class.

Manages undelivered messages.

add_message(msg: aries_cloudagent.transport.outbound.message.OutboundMessage)[source]

Add an OutboundMessage to delivery queue.

The message is added once per recipient key

Parameters:msg – The OutboundMessage to add
expire_messages(ttl=None)[source]

Expire messages that are past the time limit.

Parameters:ttl – Optional. Allows override of configured ttl
get_one_message_for_key(key: str)[source]

Remove and return a matching message.

Parameters:key – The key to use for lookup
has_message_for_key(key: str)[source]

Check for queued messages by key.

Parameters:key – The key to use for lookup
inspect_all_messages_for_key(key: str)[source]

Return all messages for key.

Parameters:key – The key to use for lookup
message_count_for_key(key: str)[source]

Count of queued messages by key.

Parameters:key – The key to use for lookup
remove_message_for_key(key: str, msg: aries_cloudagent.transport.outbound.message.OutboundMessage)[source]

Remove specified message from queue for key.

Parameters:
  • key – The key to use for lookup
  • msg – The message to remove from the queue
class aries_cloudagent.transport.inbound.delivery_queue.QueuedMessage(msg: aries_cloudagent.transport.outbound.message.OutboundMessage)[source]

Bases: object

Wrapper Class for queued messages.

Allows tracking Metadata.

older_than(compare_timestamp: float) → bool[source]

Age Comparison.

Allows you to test age as compared to the provided timestamp.

Parameters:compare_timestamp – The timestamp to compare

aries_cloudagent.transport.inbound.http module

aries_cloudagent.transport.inbound.manager module

aries_cloudagent.transport.inbound.message module

Classes representing inbound messages.

class aries_cloudagent.transport.inbound.message.InboundMessage(payload: Union[str, bytes], receipt: aries_cloudagent.transport.inbound.receipt.MessageReceipt, *, connection_id: str = None, session_id: str = None, transport_type: str = None)[source]

Bases: object

Container class linking a message payload with its receipt details.

dispatch_processing_complete()[source]

Dispatch processing complete.

wait_processing_complete()[source]

Wait for processing to complete.

aries_cloudagent.transport.inbound.receipt module

Classes for representing message receipt details.

class aries_cloudagent.transport.inbound.receipt.MessageReceipt(*, connection_id: str = None, direct_response_mode: str = None, in_time: datetime.datetime = None, raw_message: str = None, recipient_verkey: str = None, recipient_did: str = None, recipient_did_public: bool = None, sender_did: str = None, sender_verkey: str = None, thread_id: str = None, parent_thread_id: str = None)[source]

Bases: object

Properties of an agent message’s delivery.

REPLY_MODE_ALL = 'all'
REPLY_MODE_NONE = 'none'
REPLY_MODE_THREAD = 'thread'
connection_id

Accessor for the pairwise connection identifier.

Returns:This context’s connection identifier
direct_response_mode

Accessor for the requested direct response mode.

Returns:This context’s requested direct response mode
direct_response_requested

Accessor for the the state of the direct response mode.

Returns:This context’s requested direct response mode
in_time

Accessor for the datetime the message was received.

Returns:This context’s received time
parent_thread_id

Accessor for the identifier of the message parent thread.

Returns:The delivery parent thread ID
raw_message

Accessor for the raw message text.

Returns:The raw message text
recipient_did

Accessor for the recipient DID which corresponds with the verkey.

Returns:The recipient DID
recipient_did_public

Check if the recipient did is public.

Indicates whether the message is associated with a public (ledger) recipient DID.

Returns:True if the recipient’s DID is public, else false
recipient_verkey

Accessor for the recipient verkey key used to pack the incoming request.

Returns:The recipient verkey
sender_did

Accessor for the sender DID which corresponds with the verkey.

Returns:The sender did
sender_verkey

Accessor for the sender public key used to pack the incoming request.

Returns:This context’s sender’s verkey
thread_id

Accessor for the identifier of the message thread.

Returns:The delivery thread ID

aries_cloudagent.transport.inbound.session module

aries_cloudagent.transport.inbound.ws module