org.teiid.net.socket
Class SocketServerConnectionFactory
java.lang.Object
org.teiid.net.socket.SocketServerConnectionFactory
- All Implemented Interfaces:
- ServerConnectionFactory, SocketServerInstanceFactory
public class SocketServerConnectionFactory
- extends java.lang.Object
- implements ServerConnectionFactory, SocketServerInstanceFactory
Responsible for creating socket based connections
The comm approach is object based and layered. Connections manage failover and identity.
ServerInstances represent the service layer to a particular cluster member. ObjectChannels
abstract the underlying IO.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketServerConnectionFactory
public SocketServerConnectionFactory()
getInstance
public static SocketServerConnectionFactory getInstance()
initialize
public void initialize(java.util.Properties info)
getServerInstance
public SocketServerInstance getServerInstance(HostInfo info)
throws CommunicationException,
java.io.IOException
- Specified by:
getServerInstance in interface SocketServerInstanceFactory
- Throws:
CommunicationException
java.io.IOException
getConnection
public SocketServerConnection getConnection(java.util.Properties connectionProperties)
throws CommunicationException,
ConnectionException
- Description copied from interface:
ServerConnectionFactory
- Establish a connection to the server.
- Specified by:
getConnection in interface ServerConnectionFactory
- Parameters:
connectionProperties - will be updated with additional information before logon
- Returns:
- A connection, never null
- Throws:
CommunicationException - 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 server
getSynchronousTtl
public long getSynchronousTtl()
setSynchronousTtl
public void setSynchronousTtl(long synchronousTTL)
getMaxCachedInstances
public int getMaxCachedInstances()
setMaxCachedInstances
public void setMaxCachedInstances(int maxCachedInstances)
connected
public void connected(SocketServerInstance instance,
SessionToken session)
- Specified by:
connected in interface SocketServerInstanceFactory
disconnected
public void disconnected(SocketServerInstance instance,
SessionToken session)
- Specified by:
disconnected in interface SocketServerInstanceFactory
Copyright © 2011. All Rights Reserved.