Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F09A6200D71 for ; Sun, 26 Nov 2017 19:22:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EF52F160C15; Sun, 26 Nov 2017 18:22:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D4E58160C19 for ; Sun, 26 Nov 2017 19:22:22 +0100 (CET) Received: (qmail 43455 invoked by uid 500); 26 Nov 2017 18:22:22 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 43241 invoked by uid 99); 26 Nov 2017 18:22:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Nov 2017 18:22:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5A963F5FB9; Sun, 26 Nov 2017 18:22:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robbie@apache.org To: commits@qpid.apache.org Date: Sun, 26 Nov 2017 18:22:30 -0000 Message-Id: <49f9e306c2514f729d83999221e1eb55@git.apache.org> In-Reply-To: <1b1e96a723b2489e9dcfea790791212a@git.apache.org> References: <1b1e96a723b2489e9dcfea790791212a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/42] qpid-site git commit: QPID-8051: update site content for qpid-python-1.37.0 archived-at: Sun, 26 Nov 2017 18:22:26 -0000 http://git-wip-us.apache.org/repos/asf/qpid-site/blob/e970301e/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.endpoints.Session-class.html ---------------------------------------------------------------------- diff --git a/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.endpoints.Session-class.html b/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.endpoints.Session-class.html new file mode 100644 index 0000000..cbf8835 --- /dev/null +++ b/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.endpoints.Session-class.html @@ -0,0 +1,995 @@ + + + + + qpid.messaging.endpoints.Session + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package qpid :: + Package messaging :: + Module endpoints :: + Class Session + + + + + +
[frames] | no frames]
+
+ +

type Session

source code

+
+ +
+
+

Sessions provide a linear context for sending and receiving Messages. Messages are sent and received using the Sender.send and Receiver.fetch methods of the Sender + and Receiver objects associated with a Session.

+

Each Sender and Receiver is created by supplying either a target or + source address to the sender and receiver methods of the Session. The address is supplied + via a string syntax documented below.

+

Addresses

+

An address identifies a source or target for messages. In its + simplest form this is just a name. In general a target address may also + be used as a source address, however not all source addresses may be + used as a target, e.g. a source might additionally have some filtering + criteria that would not be present in a target.

+

A subject may optionally be specified along with the name. When an + address is used as a target, any subject specified in the address is + used as the default subject of outgoing messages for that target. When + an address is used as a source, any subject specified in the address is + pattern matched against the subject of available messages as a filter + for incoming messages from that source.

+

The options map contains additional information about the address + including:

+
    +
  • + policies for automatically creating, and deleting the node to which + an address refers +
  • +
  • + policies for asserting facts about the node to which an address + refers +
  • +
  • + extension points that can be used for sender/receiver configuration +
  • +
+

Mapping to AMQP 0-10

+

The name is resolved to either an exchange or a queue by querying + the broker.

+

The subject is set as a property on the message. Additionally, if + the name refers to an exchange, the routing key is set to the + subject.

+

Syntax

+

The following regular expressions define the tokens used to parse + addresses:

+
+ LBRACE: \{
+ RBRACE: \}
+ LBRACK: \[
+ RBRACK: \]
+ COLON:  :
+ SEMI:   ;
+ SLASH:  /
+ COMMA:  ,
+ NUMBER: [+-]?[0-9]*\.?[0-9]+
+ ID:     [a-zA-Z_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?
+ STRING: "(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'
+ ESC:    \\[^ux]|\\x[0-9a-fA-F][0-9a-fA-F]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]
+ SYM:    [.#*%@$^!+-]
+ WSPACE: [ \n\r\t]+
+
+

The formal grammar for addresses is given below:

+
+ address = name [ "/" subject ] [ ";" options ]
+    name = ( part | quoted )+
+ subject = ( part | quoted | "/" )*
+  quoted = STRING / ESC
+    part = LBRACE / RBRACE / COLON / COMMA / NUMBER / ID / SYM
+ options = map
+     map = "{" ( keyval ( "," keyval )* )? "}"
+  keyval = ID ":" value
+   value = NUMBER / STRING / ID / map / list
+    list = "[" ( value ( "," value )* )? "]"
+
+

This grammar resuls in the following informal syntax:

+
+ <name> [ / <subject> ] [ ; <options> ]
+
+

Where options is:

+
+ { <key> : <value>, ... }
+
+

And values may be:

+
    +
  • + numbers +
  • +
  • + single, double, or non quoted strings +
  • +
  • + maps (dictionaries) +
  • +
  • + lists +
  • +
+

Options

+

The options map permits the following parameters:

+
+ <name> [ / <subject> ] ; {
+   create: always | sender | receiver | never,
+   delete: always | sender | receiver | never,
+   assert: always | sender | receiver | never,
+   mode: browse | consume,
+   node: {
+     type: queue | topic,
+     durable: True | False,
+     x-declare: { ... <declare-overrides> ... },
+     x-bindings: [<binding_1>, ... <binding_n>]
+   },
+   link: {
+     name: <link-name>,
+     durable: True | False,
+     reliability: unreliable | at-most-once | at-least-once | exactly-once,
+     x-declare: { ... <declare-overrides> ... },
+     x-bindings: [<binding_1>, ... <binding_n>],
+     x-subscribe: { ... <subscribe-overrides> ... }
+   }
+ }
+
+

Bindings are specified as a map with the following options:

+
+ {
+   exchange: <exchange>,
+   queue: <queue>,
+   key: <key>,
+   arguments: <arguments>
+ }
+
+

The create, delete, and assert policies specify who should perfom + the associated action:

+
    +
  • + always: the action will always be performed +
  • +
  • + sender: the action will only be performed by the sender +
  • +
  • + receiver: the action will only be performed by the + receiver +
  • +
  • + never: the action will never be performed (this is the + default) +
  • +
+

The node-type is one of:

+
    +
  • + topic: a topic node will default to the topic exchange, + x-declare may be used to specify other exchange types +
  • +
  • + queue: this is the default node-type +
  • +
+

The x-declare map permits protocol specific keys and values to be + specified when exchanges or queues are declared. These keys and + values are passed through when creating a node or asserting facts + about an existing node.

+

Examples

+

A simple name resolves to any named node, usually a queue or a + topic:

+
+ my-queue-or-topic
+
+

A simple name with a subject will also resolve to a node, but the + presence of the subject will cause a sender using this address to set + the subject on outgoing messages, and receivers to filter based on + the subject:

+
+ my-queue-or-topic/my-subject
+
+

A subject pattern can be used and will cause filtering if used by + the receiver. If used for a sender, the literal value gets set as the + subject:

+
+ my-queue-or-topic/my-*
+
+

In all the above cases, the address is resolved to an existing + node. If you want the node to be auto-created, then you can do the + following. By default nonexistent nodes are assumed to be queues:

+
+ my-queue; {create: always}
+
+

You can customize the properties of the queue:

+
+ my-queue; {create: always, node: {durable: True}}
+
+

You can create a topic instead if you want:

+
+ my-queue; {create: always, node: {type: topic}}
+
+

You can assert that the address resolves to a node with particular + properties:

+
+ my-transient-topic; {
+   assert: always,
+   node: {
+     type: topic,
+     durable: False
+   }
+ }
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Instance Methods
+   + + + + + + +
__init__(self, + connection, + name, + transactional) + source code + +
+ +
+   + + + + + + +
__repr__(self) + source code + +
+ +
+   + + + + + + +
check_error(self) + source code + +
+ +
+   + + + + + + +
get_error(self) + source code + +
+ +
+   + + + + + + +
check_closed(self) + source code + +
+ +
+ Sender + + + + + + +
sender(self, + target, + **options)
+ Creates a Sender that may be used to send Messages to the specified target.
+ source code + +
+ +
+ Receiver + + + + + + +
receiver(self, + source, + **options)
+ Creates a receiver that may be used to fetch Messages from the specified source.
+ source code + +
+ +
+   + + + + + + +
set_message_received_notify_handler(self, + handler)
+ Register a callable that will be invoked when a Message arrives on + the Session.
+ source code + +
+ +
+   + + + + + + +
set_message_received_handler(self, + handler) + source code + +
+ +
+   + + + + + + +
next_receiver(self, + timeout=None) + source code + +
+ +
+   + + + + + + +
acknowledge(self, + message=None, + disposition=None, + sync=True)
+ Acknowledge the given Message.
+ source code + +
+ +
+   + + + + + + +
commit(self, + timeout=None)
+ Commit outstanding transactional work.
+ source code + +
+ +
+   + + + + + + +
rollback(self, + timeout=None)
+ Rollback outstanding transactional work.
+ source code + +
+ +
+   + + + + + + +
sync(self, + timeout=None)
+ Sync the session.
+ source code + +
+ +
+   + + + + + + +
close(self, + timeout=None)
+ Close the session.
+ source code + +
+ +
+

Inherited from Endpoint: + set_async_exception_notify_handler +

+
+ + + + + + +
+ Method Details
+ +
+ +
+ + +
+

__init__(self, + connection, + name, + transactional) +
(Constructor) +

+
source code  +
+ + +
+
Overrides: + Endpoint.__init__ +
+
+
+
+ +
+ +
+ + +
+

__repr__(self) +
(Representation operator) +

+
source code  +
+ + +
+
Overrides: + object.__repr__ +
(inherited documentation)
+ +
+
+
+ +
+ +
+ + +
+

sender(self, + target, + **options) +

+
source code  +
+ +

Creates a Sender that may be used to send Messages to the specified target.

+
+
Parameters:
+
    +
  • target (str) - the target to which messages will be sent
  • +
+
Returns: Sender
+
a new Sender for the specified target
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

receiver(self, + source, + **options) +

+
source code  +
+ +

Creates a receiver that may be used to fetch Messages from the specified source.

+
+
Parameters:
+
    +
  • source (str) - the source of Messages
  • +
+
Returns: Receiver
+
a new Receiver for the specified source
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

set_message_received_notify_handler(self, + handler) +

+
source code  +
+ +

Register a callable that will be invoked when a Message arrives on the + Session.

+
+
Parameters:
+
    +
  • handler (a callable object taking a Session instance as its only argument) - invoked by the driver thread when an error occurs.
  • +
+
Returns:
+
None
+
Decorators:
+
    +
  • @synchronized
  • +
+
+

Note: + When using this method it is recommended to also register + asynchronous error callbacks on all endpoint objects. Doing so will + cause the application to be notified if an error is raised by the + driver thread. This is necessary as after a driver error occurs the + message received callback may never be invoked again. See Endpoint.set_async_exception_notify_handler +

+

Warning: + Use with caution This callback is invoked in the context of + the driver thread. It is NOT safe to call ANY of the + public messaging APIs from within this callback, including any of + the passed Session's methods. The intent of the handler is to + provide an efficient way to notify the application that a message + has arrived. This can be useful for those applications that need + to schedule a task to poll for received messages without blocking + in the messaging API. The scheduled task may then retrieve the + message using next_receiver and Receiver.fetch +

+
+
+ +
+ +
+ + +
+

set_message_received_handler(self, + handler) +

+
source code  +
+ + +
+
Decorators:
+
    +
  • @synchronized
  • +
+
+

Deprecated: + Use set_message_received_notify_handler instead. +

+
+
+ +
+ +
+ + +
+

next_receiver(self, + timeout=None) +

+
source code  +
+ + +
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

acknowledge(self, + message=None, + disposition=None, + sync=True) +

+
source code  +
+ +

Acknowledge the given Message. If message is None, then all unacknowledged + messages on the session are acknowledged.

+
+
Parameters:
+
    +
  • message (Message) - the message to acknowledge or None
  • +
  • sync (boolean) - if true then block until the message(s) are acknowledged
  • +
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

commit(self, + timeout=None) +

+
source code  +
+ +

Commit outstanding transactional work. This consists of all message + sends and receives since the prior commit or rollback.

+
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

rollback(self, + timeout=None) +

+
source code  +
+ +

Rollback outstanding transactional work. This consists of all message + sends and receives since the prior commit or rollback.

+
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

sync(self, + timeout=None) +

+
source code  +
+ +

Sync the session.

+
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+ +
+ +
+ + +
+

close(self, + timeout=None) +

+
source code  +
+ +

Close the session.

+
+
Decorators:
+
    +
  • @synchronized
  • +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/e970301e/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.exceptions-module.html ---------------------------------------------------------------------- diff --git a/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.exceptions-module.html b/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.exceptions-module.html new file mode 100644 index 0000000..61e73fb --- /dev/null +++ b/input/releases/qpid-python-1.37.0/messaging-api/api/qpid.messaging.exceptions-module.html @@ -0,0 +1,335 @@ + + + + + qpid.messaging.exceptions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package qpid :: + Package messaging :: + Module exceptions + + + + + +
[frames] | no frames]
+
+ +

Module exceptions

source code

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Classes
+ Timeout +
+ MessagingError +
+ InternalError +
+ ConnectionError
+ The base class for all connection related exceptions. +
+ ConnectError
+ Exception raised when there is an error connecting to the remote + peer. +
+ VersionError +
+ AuthenticationFailure +
+ ConnectionClosed +
+ HeartbeatTimeout +
+ SessionError +
+ Detached
+ Exception raised when an operation is attempted that is illegal + when detached. +
+ NontransactionalSession
+ Exception raised when commit or rollback is attempted on a non + transactional session. +
+ TransactionError
+ Base class for transactional errors +
+ TransactionAborted
+ The transaction was automatically rolled back. +
+ TransactionUnknown
+ The outcome of the transaction on the broker (commit or roll-back) + is not known. +
+ UnauthorizedAccess +
+ ServerError +
+ SessionClosed +
+ LinkError +
+ InsufficientCapacity +
+ AddressError +
+ MalformedAddress +
+ InvalidOption +
+ ResolutionError +
+ AssertionFailed +
+ NotFound +
+ LinkClosed +
+ SenderError +
+ SendError +
+ TargetCapacityExceeded +
+ ReceiverError +
+ FetchError +
+ Empty
+ Exception raised by Receiver.fetch when there is no message available + within the alloted time. +
+ ContentError
+ This type of exception will be returned to the application once, + and will not block further requests +
+ EncodeError +
+ DecodeError +
+ + + + + + + + + +
+ Variables
+   + + __package__ = None +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org