Class ReceiverOptions

  • Direct Known Subclasses:
    StreamReceiverOptions

    public class ReceiverOptions
    extends java.lang.Object
    Options that control the behavior of the Receiver created from them.
    • Constructor Detail

      • ReceiverOptions

        public ReceiverOptions()
        Create a new ReceiverOptions instance with defaults set for all options.
      • ReceiverOptions

        public ReceiverOptions​(ReceiverOptions options)
        Create a new ReceiverOptions instance that copies the configuration from the specified source options.
        Parameters:
        options - The ReceiverOptions instance whose settings are to be copied into this one.
    • Method Detail

      • autoAccept

        public ReceiverOptions autoAccept​(boolean autoAccept)
        Controls if the created Receiver will automatically accept the deliveries that have been received by the application (default is true).
        Parameters:
        autoAccept - The value to assign for auto delivery acceptance.
        Returns:
        this ReceiverOptions instance.
      • autoAccept

        public boolean autoAccept()
        Returns:
        the current value of the Receiver auto accept setting.
      • autoSettle

        public ReceiverOptions autoSettle​(boolean autoSettle)
        Controls if the created Receiver will automatically settle the deliveries that have been received by the application (default is true).
        Parameters:
        autoSettle - The value to assign for auto delivery settlement.
        Returns:
        this ReceiverOptions instance.
      • autoSettle

        public boolean autoSettle()
        Returns:
        the current value of the Receiver auto settlement setting.
      • deliveryMode

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

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

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

        public int creditWindow()
        Returns:
        the credit window configuration that will be applied to created Receiver instances.
      • creditWindow

        public ReceiverOptions creditWindow​(int creditWindow)
        A credit window value that will be used to maintain an window of credit for Receiver instances that are created. The Receiver will allow up to the credit window amount of incoming deliveries to be queued and as they are read from the Receiver the window will be extended to maintain a consistent backlog of deliveries. The default is to configure a credit window of 10.

        To disable credit windowing and allow the client application to control the credit on the Receiver link the credit window value should be set to zero.

        Parameters:
        creditWindow - The assigned credit window value to use.
        Returns:
        this ReceiverOptions instance.
      • closeTimeout

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

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

        public ReceiverOptions 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 Receiver link.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this ReceiverOptions instance.
      • openTimeout

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

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

        public ReceiverOptions 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 Receiver has been honored.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this ReceiverOptions instance.
      • drainTimeout

        public long drainTimeout()
        Returns:
        the configured drain timeout value that will use to fail a pending drain request.
      • drainTimeout

        public ReceiverOptions drainTimeout​(long drainTimeout)
        Sets the drain timeout (in milliseconds) after which a Receiver request to drain link credit is considered failed and the request will be marked as such.
        Parameters:
        drainTimeout - the drainTimeout to use for receiver links.
        Returns:
        this ReceiverOptions instance.
      • drainTimeout

        public ReceiverOptions drainTimeout​(long timeout,
                                            java.util.concurrent.TimeUnit units)
        Sets the drain timeout value after which a Receiver request to drain link credit is considered failed and the request will be marked as such.
        Parameters:
        timeout - Timeout value to wait for a remote response.
        units - The TimeUnit that defines the timeout span.
        Returns:
        this ReceiverOptions instance.
      • requestTimeout

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

        public ReceiverOptions 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 ReceiverOptions instance.
      • requestTimeout

        public ReceiverOptions 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 ReceiverOptions instance.
      • offeredCapabilities

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

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

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

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

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

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

        public SourceOptions sourceOptions()
        Returns:
        the source options that will be used when creating new Receiver instances.
      • targetOptions

        public TargetOptions targetOptions()
        Returns:
        the target options that will be used when creating new Sender instances.
      • clone

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

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