Class BoshConnectionConfiguration

  • All Implemented Interfaces:
    ConnectionConfiguration

    public final class BoshConnectionConfiguration
    extends ClientConnectionConfiguration
    A configuration for a BOSH connection.

    It allows you to configure basic connection settings like hostname and port, but also BOSH specific settings like the wait interval, a route or the use of a key sequencing mechanism.

    Usage

    In order to create an instance of this class you have to use the builder pattern as shown below.

    
     BoshConnectionConfiguration boshConnectionConfiguration = BoshConnectionConfiguration.builder()
         .hostname("localhost")
         .port(5280)
         .path("/http-bind/")
         .build();
     

    The above sample boshConnectionConfiguration will connect to http://localhost:5280/http-bind/.

    This class is immutable.

    See Also:
    TcpConnectionConfiguration, BoshConnection
    • Method Detail

      • getDefault

        public static BoshConnectionConfiguration getDefault()
        Gets the default boshConnectionConfiguration.
        Returns:
        The default boshConnectionConfiguration.
      • setDefault

        public static void setDefault​(BoshConnectionConfiguration configuration)
        Sets the default configuration.
        Parameters:
        configuration - The default configuration.
      • getWait

        public final Duration getWait()
        Gets the longest time (in seconds) that the connection manager is allowed to wait before responding to any request during the session.
        Returns:
        The wait time.
      • getPath

        public final String getPath()
        Gets the path on the host, e.g. "/http-bind/".
        Returns:
        The path on the host.
      • getRoute

        public final String getRoute()
        Gets the route.
        Returns:
        The route.
      • isUseKeySequence

        public final boolean isUseKeySequence()
        If the connection is secured via a key sequence mechanism.
        Returns:
        If the connection is secured via a key sequence mechanism.