Class ServerConnection
java.lang.Object
com.levigo.jadice.web.conn.client.ServerConnection
This is the abstract connection to the server. Over a WebtoolkitConnection services can be
called, checked if they are available and the current connection state can be requested.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerConnection
get()
Returns the previous createdServerConnection
using theServerConnectionBuilder
if one was created or null if no connection was created.abstract String
Returns server address currently in use.abstract TransportClient
Returns the underlying network implementation.protected static void
reset()
Reset the providedServerConnection
instance for tests.abstract void
abstract ServerConnection.Cancelable
send
(Message message, boolean highPriority, ConversationMessageListener.ConversationListener convListener) protected static void
set
(ServerConnection connection) Sets aServerConnection
created by theServerConnectionBuilder
.abstract void
setAuthenticationInfo
(String authenticationInfo) Set or update the information provided by the client used to authenticate document accesses in the backend.
-
Constructor Details
-
ServerConnection
public ServerConnection()
-
-
Method Details
-
get
Returns the previous createdServerConnection
using theServerConnectionBuilder
if one was created or null if no connection was created.- Returns:
- the
ServerConnection
-
set
Sets aServerConnection
created by theServerConnectionBuilder
. The connection is automatically set by the constructor of the implementation.- Parameters:
connection
- the createdServerConnection
-
reset
protected static void reset()Reset the providedServerConnection
instance for tests. -
getTransportClient
Returns the underlying network implementation. See:TransportClient
.- Returns:
- the
TransportClient
-
getServerAddress
Returns server address currently in use.- Returns:
- the address of the server the client is connected to
-
setAuthenticationInfo
Set or update the information provided by the client used to authenticate document accesses in the backend. The actual information is integration specific. It could, for example, be a JWT/OAuth token, a session-based token, some form of encoded user-id and credentials etc.For authentication information with a limited validity period care must be taken to re-set/update the information with renewed
- Parameters:
authenticationInfo
- the authentication info to send
-
send
-
send
public abstract ServerConnection.Cancelable send(Message message, boolean highPriority, ConversationMessageListener.ConversationListener convListener)
-