Class ClientStreamSession
java.lang.Object
org.apache.qpid.protonj2.client.impl.ClientSession
org.apache.qpid.protonj2.client.impl.ClientStreamSession
- All Implemented Interfaces:
AutoCloseable
,Session
A specialized
ClientSession
that is the parent of a ClientStreamSender
or
ClientStreamReceiver
and cannot create any further resources as the lifetime of the
session is tied to the child StreamSender
or StreamReceiver
.-
Method Summary
Modifier and TypeMethodDescriptionCreates a sender that is established to the 'anonymous relay' and as such each message that is sent using this sender must specify an address in its destination address field.openAnonymousSender
(SenderOptions senderOptions) Creates a sender that is established to the 'anonymous relay' and as such each message that is sent using this sender must specify an address in its destination address field.openDurableReceiver
(String address, String subscriptionName) Creates a receiver used to consume messages from the given node address and configure it such that the remote create a durable node.openDurableReceiver
(String address, String subscriptionName, ReceiverOptions receiverOptions) Creates a receiver used to consume messages from the given node address and configure it such that the remote create a durable node.Creates a dynamic receiver used to consume messages from the given node address.openDynamicReceiver
(Map<String, Object> dynamicNodeProperties) Creates a dynamic receiver used to consume messages from the given node address.openDynamicReceiver
(Map<String, Object> dynamicNodeProperties, ReceiverOptions receiverOptions) Creates a dynamic receiver used to consume messages from the given node address.openDynamicReceiver
(ReceiverOptions receiverOptions) Creates a dynamic receiver used to consume messages from the given node address.openReceiver
(String address) Creates a receiver used to consume messages from the given node address.openReceiver
(String address, ReceiverOptions receiverOptions) Creates a receiver used to consume messages from the given node address.openSender
(String address) Creates a sender used to send messages to the given node address.openSender
(String address, SenderOptions senderOptions) Creates a sender used to send messages to the given node address.Methods inherited from class org.apache.qpid.protonj2.client.impl.ClientSession
beginTransaction, checkClosedOrFailed, client, close, close, closeAsync, closeAsync, commitTransaction, connection, desiredCapabilities, nextReceiver, nextReceiver, nextReceiver, nextReceiver, offeredCapabilities, openFuture, properties, rollbackTransaction
-
Method Details
-
openReceiver
Description copied from interface:Session
Creates a receiver used to consume messages from the given node address.- Specified by:
openReceiver
in interfaceSession
- Overrides:
openReceiver
in classClientSession
- Parameters:
address
- The source address to attach the consumer to.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openReceiver
public Receiver openReceiver(String address, ReceiverOptions receiverOptions) throws ClientException Description copied from interface:Session
Creates a receiver used to consume messages from the given node address.- Specified by:
openReceiver
in interfaceSession
- Overrides:
openReceiver
in classClientSession
- Parameters:
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDurableReceiver
Description copied from interface:Session
Creates a receiver used to consume messages from the given node address and configure it such that the remote create a durable node.- Specified by:
openDurableReceiver
in interfaceSession
- Overrides:
openDurableReceiver
in classClientSession
- Parameters:
address
- The source address to attach the consumer to.subscriptionName
- The name to give the subscription (link name).- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDurableReceiver
public Receiver openDurableReceiver(String address, String subscriptionName, ReceiverOptions receiverOptions) throws ClientException Description copied from interface:Session
Creates a receiver used to consume messages from the given node address and configure it such that the remote create a durable node.- Specified by:
openDurableReceiver
in interfaceSession
- Overrides:
openDurableReceiver
in classClientSession
- Parameters:
address
- The source address to attach the consumer to.subscriptionName
- The name to give the subscription (link name).receiverOptions
- The options for this receiver.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDynamicReceiver
Description copied from interface:Session
Creates a dynamic receiver used to consume messages from the given node address.- Specified by:
openDynamicReceiver
in interfaceSession
- Overrides:
openDynamicReceiver
in classClientSession
- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDynamicReceiver
public Receiver openDynamicReceiver(Map<String, Object> dynamicNodeProperties) throws ClientExceptionDescription copied from interface:Session
Creates a dynamic receiver used to consume messages from the given node address.- Specified by:
openDynamicReceiver
in interfaceSession
- Overrides:
openDynamicReceiver
in classClientSession
- Parameters:
dynamicNodeProperties
- The dynamic node properties to be applied to the node created by the remote.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDynamicReceiver
Description copied from interface:Session
Creates a dynamic receiver used to consume messages from the given node address.- Specified by:
openDynamicReceiver
in interfaceSession
- Overrides:
openDynamicReceiver
in classClientSession
- Parameters:
receiverOptions
- The options for this receiver.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDynamicReceiver
public Receiver openDynamicReceiver(Map<String, Object> dynamicNodeProperties, ReceiverOptions receiverOptions) throws ClientExceptionDescription copied from interface:Session
Creates a dynamic receiver used to consume messages from the given node address.- Specified by:
openDynamicReceiver
in interfaceSession
- Overrides:
openDynamicReceiver
in classClientSession
- Parameters:
dynamicNodeProperties
- The dynamic node properties to be applied to the node created by the remote.receiverOptions
- The options for this receiver.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openSender
Description copied from interface:Session
Creates a sender used to send messages to the given node address. If no address (i.e null) is specified then a sender will be established to the 'anonymous relay' and each message must specify its destination address.- Specified by:
openSender
in interfaceSession
- Overrides:
openSender
in classClientSession
- Parameters:
address
- The target address to attach to, or null to attach to the anonymous relay.- Returns:
- the newly created
Sender
. - Throws:
ClientException
- if an internal error occurs.
-
openSender
Description copied from interface:Session
Creates a sender used to send messages to the given node address. If no address (i.e null) is specified then a sender will be established to the 'anonymous relay' and each message must specify its destination address.- Specified by:
openSender
in interfaceSession
- Overrides:
openSender
in classClientSession
- Parameters:
address
- The target address to attach to, or null to attach to the anonymous relay.senderOptions
- The options for this sender.- Returns:
- the newly created
Sender
. - Throws:
ClientException
- if an internal error occurs.
-
openAnonymousSender
Description copied from interface:Session
Creates a sender that is established to the 'anonymous relay' and as such each message that is sent using this sender must specify an address in its destination address field.- Specified by:
openAnonymousSender
in interfaceSession
- Overrides:
openAnonymousSender
in classClientSession
- Returns:
- the newly created
Sender
. - Throws:
ClientException
- if an internal error occurs.ClientUnsupportedOperationException
- if the remote did not signal support for anonymous relays.
-
openAnonymousSender
Description copied from interface:Session
Creates a sender that is established to the 'anonymous relay' and as such each message that is sent using this sender must specify an address in its destination address field.- Specified by:
openAnonymousSender
in interfaceSession
- Overrides:
openAnonymousSender
in classClientSession
- Parameters:
senderOptions
- The options for this sender.- Returns:
- the newly created
Sender
. - Throws:
ClientException
- if an internal error occurs.ClientUnsupportedOperationException
- if the remote did not signal support for anonymous relays.
-