Class SenderOptions

  • Direct Known Subclasses:
    StreamSenderOptions

    public class SenderOptions
    extends java.lang.Object
    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

      • linkName

        public SenderOptions linkName​(java.lang.String linkName)
        Configures the link name to use when creating a given Sender instance.
        Parameters:
        linkName - The assigned link name to use when creating a Sender.
        Returns:
        this SenderOptions instance.
      • linkName

        public java.lang.String linkName()
        Returns:
        the configured link name to use when creating a Sender.
      • autoSettle

        public SenderOptions autoSettle​(boolean autoSettle)
        Sets whether sent deliveries should be automatically locally-settled once they have become remotely-settled by the receiving peer. True by default.
        Parameters:
        autoSettle - whether deliveries should be auto settled locally after being settled by the receiver
        Returns:
        the sender
      • autoSettle

        public boolean autoSettle()
        Get whether the Sender is auto settling deliveries.
        Returns:
        whether deliveries should be auto settled locally after being settled by the receiver
        See Also:
        autoSettle(boolean)
      • deliveryMode

        public DeliveryMode deliveryMode()
        Returns:
        the current value of the Sender delivery mode configuration.
      • closeTimeout

        public long closeTimeout()
        Returns:
        the timeout used when awaiting a response from the remote when a Sender is closed.
      • closeTimeout

        public SenderOptions closeTimeout​(long closeTimeout)
        Configures the timeout used when awaiting a response from the remote that a request to close the Sender link.
        Parameters:
        closeTimeout - Timeout value in milliseconds to wait for a remote response.
        Returns:
        this SenderOptions instance.
      • closeTimeout

        public SenderOptions closeTimeout​(long timeout,
                                          java.util.concurrent.TimeUnit units)
        Configures the timeout used when awaiting a response from the remote that a request to close the Sender link.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this SenderOptions instance.
      • openTimeout

        public long openTimeout()
        Returns:
        the timeout used when awaiting a response from the remote when a Sender is opened.
      • openTimeout

        public SenderOptions openTimeout​(long openTimeout)
        Configures the timeout used when awaiting a response from the remote that a request to open a Sender has been honored.
        Parameters:
        openTimeout - Timeout value in milliseconds to wait for a remote response.
        Returns:
        this SenderOptions instance.
      • openTimeout

        public SenderOptions openTimeout​(long timeout,
                                         java.util.concurrent.TimeUnit units)
        Configures the timeout used when awaiting a response from the remote that a request to open a Sender has been honored.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this SenderOptions instance.
      • 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.
      • requestTimeout

        public long requestTimeout()
        Returns:
        the timeout used when awaiting a response from the remote when a resource makes a request.
      • requestTimeout

        public SenderOptions requestTimeout​(long requestTimeout)
        Configures the timeout used when awaiting a response from the remote that a request to perform some action such as starting a new transaction. If the remote does not respond within the configured timeout the resource making the request will mark it as failed and return an error to the request initiator usually in the form of a ClientOperationTimedOutException.
        Parameters:
        requestTimeout - Timeout value in milliseconds to wait for a remote response.
        Returns:
        this SenderOptions instance.
      • requestTimeout

        public SenderOptions requestTimeout​(long timeout,
                                            java.util.concurrent.TimeUnit units)
        Configures the timeout used when awaiting a response from the remote that a request to perform some action such as starting a new transaction. If the remote does not respond within the configured timeout the resource making the request will mark it as failed and return an error to the request initiator usually in the form of a ClientOperationTimedOutException.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this SenderOptions instance.
      • offeredCapabilities

        public java.lang.String[] offeredCapabilities()
        Returns:
        the offeredCapabilities
      • offeredCapabilities

        public SenderOptions offeredCapabilities​(java.lang.String... offeredCapabilities)
        Parameters:
        offeredCapabilities - the offeredCapabilities to set
        Returns:
        this SenderOptions instance.
      • desiredCapabilities

        public java.lang.String[] desiredCapabilities()
        Returns:
        the desiredCapabilities
      • desiredCapabilities

        public SenderOptions desiredCapabilities​(java.lang.String... desiredCapabilities)
        Parameters:
        desiredCapabilities - the desiredCapabilities to set
        Returns:
        this SenderOptions instance.
      • properties

        public java.util.Map<java.lang.String,​java.lang.Object> properties()
        Returns:
        the properties
      • properties

        public SenderOptions properties​(java.util.Map<java.lang.String,​java.lang.Object> properties)
        Parameters:
        properties - the properties to set
        Returns:
        this SenderOptions instance.
      • sourceOptions

        public SourceOptions sourceOptions()
        Returns:
        the source
      • targetOptions

        public TargetOptions targetOptions()
        Returns:
        the target
      • clone

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

        protected SenderOptions copyInto​(SenderOptions other)
        Copy all options from this SenderOptions instance into the instance provided.
        Parameters:
        other - the target of this copy operation.
        Returns:
        this options class for chaining.