Package com.streambase.liveview.client
Interface LiveViewConnectionControl
-
public interface LiveViewConnectionControlWhen using a LiveViewMultiConnection, this represents one of the connections.- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLiveViewConnectionControl.ConnectionStateThe status of this connection
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConnectionConfiggetConnectionConfig()LiveViewConnectionControl.ConnectionStategetConnectionState()longgetLastSuccessfulConnect()If the current status is CONNECTED, this will have the time this connection was made.intgetRetryCount()Valid only if the current state is TRYING_TO_CONNECT.StringgetUri()Convenience method that is the same as getConnectionConfig().getUri()VersionTypegetVersion()If this server has never been successfully connected to, this value will be null.booleanisCurrent()voidsetActive(boolean active)If a connection is set to be inactive, it will stop attempting to connect to the server.
-
-
-
Method Detail
-
getConnectionConfig
ConnectionConfig getConnectionConfig()
- Returns:
- the connectionConfig that was / will be used to create this connection.
-
getUri
String getUri()
Convenience method that is the same as getConnectionConfig().getUri()- Returns:
- The URI to the server represented by this ConnectionControl.
-
isCurrent
boolean isCurrent()
- Returns:
- true if this connection is the currently active connection
-
getConnectionState
LiveViewConnectionControl.ConnectionState getConnectionState()
- Returns:
- The state of this connection.
-
getLastSuccessfulConnect
long getLastSuccessfulConnect()
If the current status is CONNECTED, this will have the time this connection was made.- Returns:
- time of last successful connect, or Long.MIN_VALUE if never connected.
-
getVersion
VersionType getVersion()
If this server has never been successfully connected to, this value will be null.- Returns:
- The version information received from the server in the last successful connect to it, if there have been any.
-
getRetryCount
int getRetryCount()
Valid only if the current state is TRYING_TO_CONNECT. It is the number of tries since the last successful connect, or since startup if there has never been a successful connect to this server.- Returns:
- number of tries since the last successful connect
-
setActive
void setActive(boolean active)
If a connection is set to be inactive, it will stop attempting to connect to the server.- Parameters:
active-
-
-