com.streambase.liveview.client

## Class ConnectionConfig

- java.lang.Object
- - com.streambase.liveview.client.ConnectionConfig

-     public final class ConnectionConfig
      extends Object

  Connection configuration used to connect to LiveView server.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectionConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConnectionConfig` | `clone()`
    `EnumSet<LiveViewClientCapability>` | `getCapabilities()` Get the capabilities
    `ProgressMonitor` | `getConnectionMonitor()` The api uses this method to retrieve the progress monitor specified by the user.
    `URI` | `getDisplayUri()` Get the display uri
    `ConnectionListener` | `getListener()` Get the connection listener
    `String` | `getPassword()` Get the password to connect with
    `String` | `getUri()` Get the uri to connect with
    `String` | `getUsername()` Get the username to connect with
    `boolean` | `isCompress()` Get the compression state of this connection
    `ConnectionConfig` | `setCapabilities(EnumSet<LiveViewClientCapability> capabilities)` Set the ClientCapabilities that are supported by this client.
    `ConnectionConfig` | `setCompress(boolean compress)` Enable or disable compression on this connection
    `ConnectionConfig` | `setConnectionMonitor(ProgressMonitor monitor)` Sets the monitor to use by the api
    `ConnectionConfig` | `setListener(ConnectionListener listener)` Set the connection listener
    `ConnectionConfig` | `setPassword(String password)` Set the password to connect with
    `ConnectionConfig` | `setUri(String uri)` Set the uri to connect with.
    `ConnectionConfig` | `setUsername(String username)` Set the username to connect with

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConnectionConfig

          public ConnectionConfig()

  - ### Method Detail

    - #### getConnectionMonitor

          public ProgressMonitor getConnectionMonitor()

      The api uses this method to retrieve the progress monitor specified by the user.
      Returns:
        the monitor

    - #### setConnectionMonitor

          public ConnectionConfig setConnectionMonitor(ProgressMonitor monitor)

      Sets the monitor to use by the api
      Parameters:
        `monitor` - the monitor to set

    - #### getUri

          public String getUri()

      Get the uri to connect with
      Returns:
        the uri
      Throws:
        `LiveViewException`

    - #### getDisplayUri

          public URI getDisplayUri()

      Get the display uri
      Returns:
        the sanitized uri
      Throws:
        `LiveViewException`

    - #### setUri

          public ConnectionConfig setUri(String uri)
                                  throws LiveViewException

      Set the uri to connect with. The uri has syntax lv://<host>[:<port>]
      Parameters:
        `uri` - the uri to set
      Throws:
        `LiveViewException`

    - #### getUsername

          public String getUsername()

      Get the username to connect with
      Returns:
        the username

    - #### setUsername

          public ConnectionConfig setUsername(String username)
                                       throws LiveViewException

      Set the username to connect with
      Parameters:
        `username` - the username to set
      Throws:
        `LiveViewException`

    - #### getPassword

          public String getPassword()

      Get the password to connect with
      Returns:
        the password

    - #### setPassword

          public ConnectionConfig setPassword(String password)
                                       throws LiveViewException

      Set the password to connect with
      Parameters:
        `password` - the password to set
      Throws:
        `LiveViewException`

    - #### setCompress

          public ConnectionConfig setCompress(boolean compress)

      Enable or disable compression on this connection
      Parameters:
        `compress` - true to enable compression or false otherwise
      Since:
        7.5

    - #### isCompress

          public boolean isCompress()

      Get the compression state of this connection
      Returns:
        true if traffic on this connection is being compressed and false otherwise
      Since:
        7.5

    - #### getCapabilities

          public EnumSet<LiveViewClientCapability> getCapabilities()

      Get the capabilities
      Returns:

    - #### setCapabilities

          public ConnectionConfig setCapabilities(EnumSet<LiveViewClientCapability> capabilities)

      Set the ClientCapabilities that are supported by this client. The default is that you support all the ones that exist in the version of the Java API that you're using. However, if there are capabilities that exist but you don't want to support them, specify it here.
      Parameters:
        `capabilities` -
      Since:
        LiveView 1.6.1

    - #### getListener

          public ConnectionListener getListener()

      Get the connection listener
      Returns:
        the listener

    - #### setListener

          public ConnectionConfig setListener(ConnectionListener listener)

      Set the connection listener
      Parameters:
        `listener` - the listener to set

    - #### clone

          public ConnectionConfig clone()

      Overrides:
        `clone` in class `Object`

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.