Class SenderOptions

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class SenderOptions
    extends LinkOptions<SenderOptions>
    implements java.lang.Cloneable
    Options that control the behavior of a Sender created from them.
    • Constructor Detail

      • SenderOptions

        public SenderOptions()
        Create a new SenderOptions instance 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 the Sender or the Session credit to do so, if the send blocks for longer than this timeout the send call will fail with an ClientSendTimedOutException exception to indicate that the send did not complete.
        Parameters:
        sendTimeout - Timeout value in milliseconds to wait for a remote response.
        Returns:
        this SenderOptions instance.
      • 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 the Sender or the Session credit to do so, if the send blocks for longer than this timeout the send call will fail with an ClientSendTimedOutException exception to indicate that the send did not complete.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this SenderOptions instance.
      • clone

        public SenderOptions clone()
        Overrides:
        clone in class java.lang.Object