Class ClientStreamSession
- java.lang.Object
-
- org.apache.qpid.protonj2.client.impl.ClientSession
-
- org.apache.qpid.protonj2.client.impl.ClientStreamSession
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,Session
public final class ClientStreamSession extends ClientSession
A specializedClientSession
that is the parent of aClientStreamSender
orClientStreamReceiver
and cannot create any further resources as the lifetime of the session is tied to the childStreamSender
orStreamReceiver
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sender
openAnonymousSender()
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.Sender
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.Receiver
openDurableReceiver(java.lang.String address, java.lang.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.Receiver
openDurableReceiver(java.lang.String address, java.lang.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.Receiver
openDynamicReceiver()
Creates a dynamic receiver used to consume messages from the given node address.Receiver
openDynamicReceiver(java.util.Map<java.lang.String,java.lang.Object> dynamicNodeProperties)
Creates a dynamic receiver used to consume messages from the given node address.Receiver
openDynamicReceiver(java.util.Map<java.lang.String,java.lang.Object> dynamicNodeProperties, ReceiverOptions receiverOptions)
Creates a dynamic receiver used to consume messages from the given node address.Receiver
openDynamicReceiver(ReceiverOptions receiverOptions)
Creates a dynamic receiver used to consume messages from the given node address.Receiver
openReceiver(java.lang.String address)
Creates a receiver used to consume messages from the given node address.Receiver
openReceiver(java.lang.String address, ReceiverOptions receiverOptions)
Creates a receiver used to consume messages from the given node address.Sender
openSender(java.lang.String address)
Creates a sender used to send messages to the given node address.Sender
openSender(java.lang.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 Detail
-
openReceiver
public Receiver openReceiver(java.lang.String address) 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.- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openReceiver
public Receiver openReceiver(java.lang.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
public Receiver openDurableReceiver(java.lang.String address, java.lang.String subscriptionName) 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).- Returns:
- the newly created
Receiver
- Throws:
ClientException
- if an internal error occurs.
-
openDurableReceiver
public Receiver openDurableReceiver(java.lang.String address, java.lang.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
public Receiver openDynamicReceiver() throws ClientException
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(java.util.Map<java.lang.String,java.lang.Object> dynamicNodeProperties) throws ClientException
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:
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
public Receiver openDynamicReceiver(ReceiverOptions receiverOptions) throws ClientException
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(java.util.Map<java.lang.String,java.lang.Object> dynamicNodeProperties, ReceiverOptions receiverOptions) throws ClientException
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:
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
public Sender openSender(java.lang.String address) throws ClientException
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
public Sender openSender(java.lang.String address, SenderOptions senderOptions) throws ClientException
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
public Sender openAnonymousSender() throws ClientException
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
public Sender openAnonymousSender(SenderOptions senderOptions) throws ClientException
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.
-
-