Class LinkOptions<T extends LinkOptions<T>>

    • Constructor Summary

      Constructors 
      Constructor Description
      LinkOptions()
      Create a new LinkOptions instance with defaults set for all options.
      LinkOptions​(LinkOptions<T> options)
      Create a new LinkOptions instance that copies the configuration from the specified source options.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean autoSettle()  
      T autoSettle​(boolean autoSettle)
      Controls if the created Link will automatically settle the deliveries that have been received by the application (default is true).
      long closeTimeout()  
      T closeTimeout​(long closeTimeout)
      Configures the timeout used when awaiting a response from the remote that a request to close the Link link.
      T 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 Link link.
      protected LinkOptions<T> copyInto​(LinkOptions<T> other)
      Copy all options from this LinkOptions instance into the instance provided.
      DeliveryMode deliveryMode()  
      T deliveryMode​(DeliveryMode deliveryMode)
      Sets the DeliveryMode value to assign to newly created Link instances.
      java.lang.String[] desiredCapabilities()  
      T desiredCapabilities​(java.lang.String... desiredCapabilities)  
      java.lang.String linkName()  
      T linkName​(java.lang.String linkName)
      Configures the link name to use when creating a given Link instance.
      java.lang.String[] offeredCapabilities()  
      T offeredCapabilities​(java.lang.String... offeredCapabilities)  
      long openTimeout()  
      T openTimeout​(long openTimeout)
      Configures the timeout used when awaiting a response from the remote that a request to open a Link has been honored.
      T 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 Link has been honored.
      java.util.Map<java.lang.String,​java.lang.Object> properties()  
      T properties​(java.util.Map<java.lang.String,​java.lang.Object> properties)  
      long requestTimeout()  
      T 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.
      T 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.
      protected abstract T self()  
      SourceOptions sourceOptions()  
      TargetOptions targetOptions()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LinkOptions

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

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

      • autoSettle

        public T autoSettle​(boolean autoSettle)
        Controls if the created Link 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 LinkOptions instance.
      • autoSettle

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

        public T deliveryMode​(DeliveryMode deliveryMode)
        Sets the DeliveryMode value to assign to newly created Link instances.
        Parameters:
        deliveryMode - The delivery mode value to configure.
        Returns:
        this LinkOptions instance.
      • deliveryMode

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        protected LinkOptions<T> copyInto​(LinkOptions<T> other)
        Copy all options from this LinkOptions instance into the instance provided.
        Parameters:
        other - the target of this copy operation.
        Returns:
        this options class for chaining.
      • self

        protected abstract T self()
        Returns:
        the true derived type instance for use in this class.