public class SocketServerConnection extends Object implements ServerConnection
PING_INTERVAL| Constructor and Description |
|---|
SocketServerConnection(SocketServerInstanceFactory connectionFactory,
boolean secure,
UrlServerDiscovery serverDiscovery,
Properties connProps) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate() |
void |
close() |
LogonResult |
getLogonResult() |
String |
getServerVersion() |
<T> T |
getService(Class<T> iface) |
boolean |
isLocal() |
boolean |
isOpen(long msToTest) |
boolean |
isSameInstance(ServerConnection otherService) |
SocketServerInstance |
selectServerInstance()
Implements a sticky random selection policy
TODO: make this customizable
TODO: put more information on hostinfo as to process response time, last successful connect, etc.
|
void |
setFailOver(boolean failOver) |
void |
setFailOverPingInterval(int pingFailOverInterval) |
boolean |
supportsContinuous() |
static void |
updateConnectionProperties(Properties connectionProperties,
InetAddress addr,
boolean setMac) |
public SocketServerConnection(SocketServerInstanceFactory connectionFactory, boolean secure, UrlServerDiscovery serverDiscovery, Properties connProps) throws CommunicationException, ConnectionException
public SocketServerInstance selectServerInstance() throws CommunicationException, ConnectionException
public static void updateConnectionProperties(Properties connectionProperties, InetAddress addr, boolean setMac)
public <T> T getService(Class<T> iface)
getService in interface ServerConnectionpublic void close()
close in interface ServerConnectionpublic boolean isOpen(long msToTest)
isOpen in interface ServerConnectionpublic LogonResult getLogonResult()
getLogonResult in interface ServerConnectionpublic boolean isSameInstance(ServerConnection otherService) throws CommunicationException
isSameInstance in interface ServerConnectionCommunicationExceptionpublic void setFailOver(boolean failOver)
public void setFailOverPingInterval(int pingFailOverInterval)
public void authenticate()
throws ConnectionException,
CommunicationException
authenticate in interface ServerConnectionConnectionExceptionCommunicationExceptionpublic boolean supportsContinuous()
supportsContinuous in interface ServerConnectionpublic boolean isLocal()
isLocal in interface ServerConnectionpublic String getServerVersion()
getServerVersion in interface ServerConnectionCopyright © 2018 JBoss by Red Hat. All rights reserved.