Package com.streambase.liveview.client
Class ConnectionConfig
java.lang.Object
com.streambase.liveview.client.ConnectionConfig
Connection configuration used to connect to LiveView server.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
static ConnectionConfig
fromTcdsAuthUri
(String uri, LiveViewAuth lvauth) Creates a connection config from a TCDS URI and authentication (optional).Gets the authentication method for this connectionGet the capabilitiesThe api uses this method to retrieve the progress monitor specified by the user.Deprecated.getURI now returns the display URI.Get the connection listenerDeprecated.Use get/setAuthentication instead.getUri()
Get the uri to connect with (Sanitized since 11.0)Deprecated.Use get/setAuthentication instead.boolean
Get the compression state of this connectionvoid
Sets the authentication method for this connectionsetCapabilities
(EnumSet<LiveViewClientCapability> capabilities) Set the ClientCapabilities that are supported by this client.setCompress
(boolean compress) Enable or disable compression on this connectionsetConnectionMonitor
(ProgressMonitor monitor) Sets the monitor to use by the apisetListener
(ConnectionListener listener) Set the connection listenersetPassword
(String password) Deprecated.Use get/setAuthentication instead.Set the uri to connect with.setUsername
(String username) Deprecated.Use get/setAuthentication instead.
-
Constructor Details
-
ConnectionConfig
public ConnectionConfig()
-
-
Method Details
-
getConnectionMonitor
The api uses this method to retrieve the progress monitor specified by the user.- Returns:
- the monitor
-
setConnectionMonitor
Sets the monitor to use by the api- Parameters:
monitor
- the monitor to set
-
getUri
Get the uri to connect with (Sanitized since 11.0)- Returns:
- the uri, sans authentication material
- Throws:
LiveViewException
-
getDisplayUri
Deprecated.getURI now returns the display URI. Deprecated in 11.0Get the uri- Returns:
- the sanitized uri
- Throws:
LiveViewException
-
setUri
Set the uri to connect with. The uri has syntax lv://<host>[:<port>]- Parameters:
uri
- the uri to set- Throws:
LiveViewException
-
getUsername
Deprecated.Use get/setAuthentication instead. Deprecated in 11.0Get the username to connect with- Returns:
- the username
-
setUsername
Deprecated.Use get/setAuthentication instead. Deprecated in 11.0Set the username to connect with- Parameters:
username
- the username to set- Throws:
LiveViewException
-
getPassword
Deprecated.Use get/setAuthentication instead. Deprecated in 11.0Get the password to connect with- Returns:
- the password
-
setPassword
Deprecated.Use get/setAuthentication instead. Deprecated in 11.0Set the password to connect with- Parameters:
password
- the password to set- Throws:
LiveViewException
-
getAuthentication
Gets the authentication method for this connection- Since:
- 11.0
-
setAuthentication
Sets the authentication method for this connection- Parameters:
auth
- Authentication built from static methods on LiveViewAuth- Since:
- 11.0
-
setCompress
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
Get the capabilities- Returns:
- an
EnumSet
ofLiveViewClientCapability
-
setCapabilities
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
Get the connection listener- Returns:
- the listener
-
setListener
Set the connection listener- Parameters:
listener
- the listener to set
-
clone
-
fromTcdsAuthUri
public static ConnectionConfig fromTcdsAuthUri(String uri, LiveViewAuth lvauth) throws LiveViewException Creates a connection config from a TCDS URI and authentication (optional). Connects to the TCDS server to do so- Returns:
- A connection config for the destination of the TCDS redirect with the proper auth configured
- Throws:
LiveViewException
- If the connection isn't a TCDS destination- Since:
- 11.0
-