Package proton :: Class Link

[frames] | no frames]

# Class Link

source code

         object --+
                  |
    wrapper.Wrapper --+
                      |
         object --+   |
                  |   |
           Endpoint --+
                      |
                     Link

Known Subclasses:
  - Receiver
  - , Sender

A representation of an AMQP link, of which there are two concrete implementations, Sender and Receiver.

Instance Methods

__init__(self, impl) x.__init__(...) initializes x; see help(type(x)) for signature | source code

open(self) Opens the link. | source code

close(self) Closes the link. | source code

delivery(self, tag) | source code

advance(self) | source code

next(self, mask) | source code

drained(self) | source code

detach(self) | source code

free(self) | source code

Inherited from `wrapper.Wrapper`: `__del__`, `__delattr__`, `__eq__`, `__getattr__`, `__hash__`, `__ne__`, `__repr__`, `__setattr__` Inherited from `object`: `__format__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__str__`, `__subclasshook__`

Static Methods

wrap(impl) | source code

Class Variables
| SND_UNSETTLED = `0`
| SND_SETTLED = `1`
| SND_MIXED = `2`
| RCV_FIRST = `0`
| RCV_SECOND = `1`
Inherited from `Endpoint`: `LOCAL_ACTIVE`, `LOCAL_CLOSED`, `LOCAL_UNINIT`, `REMOTE_ACTIVE`, `REMOTE_CLOSED`, `REMOTE_UNINIT`

Properties
| state The state of the link as a bit field.
| source The source of the link as described by the local peer.
| target The target of the link as described by the local peer.
| remote_source The source of the link as described by the remote peer.
| remote_target The target of the link as described by the remote peer.
| session
| connection The connection on which this link was attached.
| current
| unsettled
| credit The amount of oustanding credit on this link.
| available
| queued
| name Returns the name of the link
| is_sender Returns true if this link is a sender.
| is_receiver Returns true if this link is a receiver.
| remote_snd_settle_mode
| remote_rcv_settle_mode
| snd_settle_mode
| rcv_settle_mode
| drain_mode
Inherited from `Endpoint`: `handler`, `remote_condition`, `transport` Inherited from `object`: `__class__`

Method Details

### __init__(self, impl)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)

### open(self)

source code

Opens the link.

In more detail, this moves the local state of the link to the ACTIVE state and triggers an attach frame to be sent to the peer. A link is fully active once both peers have attached it.

### close(self)

source code

Closes the link.

In more detail, this moves the local state of the link to the CLOSED state and triggers an detach frame (with the closed flag set) to be sent to the peer. A link is fully closed once both peers have detached it.

Property Details

### state

The state of the link as a bit field. The state has a local and a remote component. Each of these can be in one of three states: UNINIT, ACTIVE or CLOSED. These can be tested by masking against LOCAL_UNINIT, LOCAL_ACTIVE, LOCAL_CLOSED, REMOTE_UNINIT, REMOTE_ACTIVE and REMOTE_CLOSED.

Get Method:
  unreachable.state(self) - The state of the link as a bit field.

### source

The source of the link as described by the local peer.

Get Method:
  unreachable.source(self) - The source of the link as described by the local peer.

### target

The target of the link as described by the local peer.

Get Method:
  unreachable.target(self) - The target of the link as described by the local peer.

### remote_source

The source of the link as described by the remote peer.

Get Method:
  unreachable.remote_source(self) - The source of the link as described by the remote peer.

### remote_target

The target of the link as described by the remote peer.

Get Method:
  unreachable.remote_target(self) - The target of the link as described by the remote peer.

### session

Get Method:
  unreachable.session(self)

### connection

The connection on which this link was attached.

Get Method:
  unreachable.connection(self) - The connection on which this link was attached.

### current

Get Method:
  unreachable.current(self)

### unsettled

Get Method:
  unreachable.unsettled(self)

### credit

The amount of oustanding credit on this link.

Get Method:
  unreachable.credit(self) - The amount of oustanding credit on this link.

### available

Get Method:
  unreachable.available(self)

### queued

Get Method:
  unreachable.queued(self)

### name

Returns the name of the link

Get Method:
  unreachable.name(self) - Returns the name of the link

### is_sender

Returns true if this link is a sender.

Get Method:
  unreachable.is_sender(self) - Returns true if this link is a sender.

### is_receiver

Returns true if this link is a receiver.

Get Method:
  unreachable.is_receiver(self) - Returns true if this link is a receiver.

### remote_snd_settle_mode

Get Method:
  unreachable.remote_snd_settle_mode(self)

### remote_rcv_settle_mode

Get Method:
  unreachable.remote_rcv_settle_mode(self)

### snd_settle_mode

Get Method:
  _get_snd_settle_mode(self)
Set Method:
  _set_snd_settle_mode(self, mode)

### rcv_settle_mode

Get Method:
  _get_rcv_settle_mode(self)
Set Method:
  _set_rcv_settle_mode(self, mode)

### drain_mode

Get Method:
  _get_drain(self)
Set Method:
  _set_drain(self, b)