Package org.apache.qpid.protonj2.client
Class SenderOptions
- java.lang.Object
-
- org.apache.qpid.protonj2.client.LinkOptions<SenderOptions>
-
- org.apache.qpid.protonj2.client.SenderOptions
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SenderOptions extends LinkOptions<SenderOptions> implements java.lang.Cloneable
Options that control the behavior of aSendercreated from them.
-
-
Constructor Summary
Constructors Constructor Description SenderOptions()Create a newSenderOptionsinstance configured with default configuration settings.SenderOptions(SenderOptions options)Create a new SenderOptions instance that copies the configuration from the specified source options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SenderOptionsclone()protected SenderOptionscopyInto(SenderOptions other)Copy all options from thisSenderOptionsinstance into the instance provided.protected SenderOptionsself()longsendTimeout()SenderOptionssendTimeout(long sendTimeout)Configures the timeout used when awaiting a send operation to complete.SenderOptionssendTimeout(long timeout, java.util.concurrent.TimeUnit units)Configures the timeout used when awaiting a send operation to complete.-
Methods inherited from class org.apache.qpid.protonj2.client.LinkOptions
autoSettle, autoSettle, closeTimeout, closeTimeout, closeTimeout, copyInto, deliveryMode, deliveryMode, desiredCapabilities, desiredCapabilities, linkName, linkName, offeredCapabilities, offeredCapabilities, openTimeout, openTimeout, openTimeout, properties, properties, requestTimeout, requestTimeout, requestTimeout, sourceOptions, targetOptions
-
-
-
-
Constructor Detail
-
SenderOptions
public SenderOptions()
Create a newSenderOptionsinstance configured with default configuration settings.
-
SenderOptions
public SenderOptions(SenderOptions options)
Create a new SenderOptions instance that copies the configuration from the specified source options.- Parameters:
options- The SenderOptions instance whose settings are to be copied into this one.
-
-
Method Detail
-
sendTimeout
public long sendTimeout()
- Returns:
- the timeout used when awaiting a response from the remote when a resource is message send.
-
sendTimeout
public SenderOptions sendTimeout(long sendTimeout)
Configures the timeout used when awaiting a send operation to complete. A send will block if the remote has not granted theSenderor theSessioncredit to do so, if the send blocks for longer than this timeout the send call will fail with anClientSendTimedOutExceptionexception to indicate that the send did not complete.- Parameters:
sendTimeout- Timeout value in milliseconds to wait for a remote response.- Returns:
- this
SenderOptionsinstance.
-
sendTimeout
public SenderOptions sendTimeout(long timeout, java.util.concurrent.TimeUnit units)
Configures the timeout used when awaiting a send operation to complete. A send will block if the remote has not granted theSenderor theSessioncredit to do so, if the send blocks for longer than this timeout the send call will fail with anClientSendTimedOutExceptionexception to indicate that the send did not complete.- Parameters:
timeout- Timeout value to wait for a remote response.units- TheTimeUnitthat defines the timeout span.- Returns:
- this
SenderOptionsinstance.
-
clone
public SenderOptions clone()
- Overrides:
clonein classjava.lang.Object
-
copyInto
protected SenderOptions copyInto(SenderOptions other)
Copy all options from thisSenderOptionsinstance into the instance provided.- Parameters:
other- the target of this copy operation.- Returns:
- the
SenderOptionsinstance that was given.
-
self
protected SenderOptions self()
- Specified by:
selfin classLinkOptions<SenderOptions>- Returns:
- the true derived type instance for use in this class.
-
-