aries_cloudagent.transport.outbound package

Submodules

aries_cloudagent.transport.outbound.base module

Base outbound transport.

class aries_cloudagent.transport.outbound.base.BaseOutboundTransport[source]

Bases: abc.ABC

Base outbound transport class.

handle_message(message: aries_cloudagent.messaging.outbound_message.OutboundMessage)[source]

Handle message from queue.

Parameters:messageOutboundMessage to send over transport implementation
start()[source]

Start the transport.

stop()[source]

Shut down the transport.

exception aries_cloudagent.transport.outbound.base.OutboundTransportRegistrationError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.error.BaseError

Outbound transport registration error.

aries_cloudagent.transport.outbound.http module

Http outbound transport.

class aries_cloudagent.transport.outbound.http.HttpTransport[source]

Bases: aries_cloudagent.transport.outbound.base.BaseOutboundTransport

Http outbound transport class.

handle_message(message: aries_cloudagent.messaging.outbound_message.OutboundMessage)[source]

Handle message from queue.

Parameters:messageOutboundMessage to send over transport implementation
schemes = ('http', 'https')
start()[source]

Start the transport.

stop()[source]

Stop the transport.

aries_cloudagent.transport.outbound.manager module

Outbound transport manager.

exception aries_cloudagent.transport.outbound.manager.OutboundDeliveryError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.error.BaseError

Base exception when a message cannot be delivered via an outbound transport.

class aries_cloudagent.transport.outbound.manager.OutboundTransportManager(queue: aries_cloudagent.transport.outbound.queue.base.BaseOutboundMessageQueue = None)[source]

Bases: object

Outbound transport manager class.

dispatch_message(message: aries_cloudagent.messaging.outbound_message.OutboundMessage, attempt: int = None)[source]

Dispatch a message to the relevant transport.

Find a registered transport for the scheme in the uri and use it to send the message.

Parameters:message – The outbound message to dispatch
get_registered_transport_for_scheme(scheme: str)[source]

Find the registered transport for a given scheme.

get_running_transport_for_scheme(scheme: str)[source]

Find the running transport for a given scheme.

poll()[source]

Send messages from the queue to the transports.

register(module_path)[source]

Register a new outbound transport by module path.

Parameters:

module_path – Module path to register

Raises:
  • OutboundTransportRegistrationError – If the imported class cannot be located
  • OutboundTransportRegistrationError – If the imported class does not specify a schemes attribute
  • OutboundTransportRegistrationError – If the scheme has already been registered
register_class(transport_class: Type[aries_cloudagent.transport.outbound.base.BaseOutboundTransport])[source]

Register a new outbound transport class.

Parameters:

transport_class – Transport class to register

Raises:
  • OutboundTransportRegistrationError – If the imported class does not specify a schemes attribute
  • OutboundTransportRegistrationError – If the scheme has already been registered
send_message(message: aries_cloudagent.messaging.outbound_message.OutboundMessage)[source]

Add a message to the outbound queue.

Parameters:message – The outbound message to send
start()[source]

Start all transports and feed messages from the queue.

start_transport(schemes, transport_cls)[source]

Start the transport.

stop(wait: bool = True)[source]

Stop all transports.

aries_cloudagent.transport.outbound.ws module

Websockets outbound transport.

class aries_cloudagent.transport.outbound.ws.WsTransport[source]

Bases: aries_cloudagent.transport.outbound.base.BaseOutboundTransport

Websockets outbound transport class.

handle_message(message: aries_cloudagent.messaging.outbound_message.OutboundMessage)[source]

Handle message from queue.

Parameters:messageOutboundMessage to send over transport implementation
schemes = ('ws', 'wss')
start()[source]

Start the outbound transport.

stop()[source]

Stop the outbound transport.