public class SocketServerConnectionFactory extends Object implements ServerConnectionFactory, SocketServerInstanceFactory
Constructor and Description |
---|
SocketServerConnectionFactory() |
Modifier and Type | Method and Description |
---|---|
void |
connected(SocketServerInstance instance,
SessionToken session) |
void |
disconnected(SocketServerInstance instance,
SessionToken session) |
SocketServerConnection |
getConnection(Properties connectionProperties)
Establish a connection to the server.
|
static SocketServerConnectionFactory |
getInstance() |
int |
getMaxCachedInstances() |
SocketServerInstance |
getServerInstance(HostInfo info) |
long |
getSynchronousTtl() |
void |
initialize(Properties info) |
void |
setMaxCachedInstances(int maxCachedInstances) |
void |
setSynchronousTtl(long synchronousTTL) |
public static SocketServerConnectionFactory getInstance()
public void initialize(Properties info)
public SocketServerInstance getServerInstance(HostInfo info) throws CommunicationException, IOException
getServerInstance
in interface SocketServerInstanceFactory
CommunicationException
IOException
public SocketServerConnection getConnection(Properties connectionProperties) throws CommunicationException, ConnectionException
ServerConnectionFactory
getConnection
in interface ServerConnectionFactory
connectionProperties
- will be updated with additional information before logonCommunicationException
- If an error occurs in connecting, typically due to
problems with the connection properties (bad user name, bad password, bad host name, etc)ConnectionException
- If an error occurs communicating between client and serverpublic long getSynchronousTtl()
public void setSynchronousTtl(long synchronousTTL)
public int getMaxCachedInstances()
public void setMaxCachedInstances(int maxCachedInstances)
public void connected(SocketServerInstance instance, SessionToken session)
connected
in interface SocketServerInstanceFactory
public void disconnected(SocketServerInstance instance, SessionToken session)
disconnected
in interface SocketServerInstanceFactory
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.