Package org.teiid.net.socket
Class SocketServerConnectionFactory
- java.lang.Object
-
- org.teiid.net.socket.SocketServerConnectionFactory
-
- All Implemented Interfaces:
ServerConnectionFactory
,HostnameResolver
,SocketServerInstanceFactory
public class SocketServerConnectionFactory extends 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.
-
-
Constructor Summary
Constructors Constructor Description SocketServerConnectionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketServerConnection
getConnection(Properties connectionProperties)
Establish a connection to the server.static SocketServerConnectionFactory
getInstance()
SocketServerInstance
getServerInstance(HostInfo info)
long
getSynchronousTtl()
void
initialize(Properties info)
String
resolveHostname(InetAddress addr)
void
setSynchronousTtl(long synchronousTTL)
-
-
-
Method Detail
-
getInstance
public static SocketServerConnectionFactory getInstance()
-
initialize
public void initialize(Properties info)
-
getServerInstance
public SocketServerInstance getServerInstance(HostInfo info) throws CommunicationException, IOException
- Specified by:
getServerInstance
in interfaceSocketServerInstanceFactory
- Throws:
CommunicationException
IOException
-
getConnection
public SocketServerConnection getConnection(Properties connectionProperties) throws CommunicationException, ConnectionException
Description copied from interface:ServerConnectionFactory
Establish a connection to the server.- Specified by:
getConnection
in interfaceServerConnectionFactory
- 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)
-
resolveHostname
public String resolveHostname(InetAddress addr)
- Specified by:
resolveHostname
in interfaceHostnameResolver
-
-