com.metamatrix.common.comm.platform.socket.client
Class SocketServerConnectionFactory

java.lang.Object
  extended by com.metamatrix.common.comm.platform.socket.client.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.


Constructor Summary
SocketServerConnectionFactory()
           
 
Method Summary
 SocketServerConnection createConnection(java.util.Properties connectionProperties)
          Establish a connection to the server.
static SocketServerConnectionFactory getInstance()
           
 int getMaxCachedInstances()
           
 SocketServerInstance getServerInstance(HostInfo info, boolean ssl)
           
 long getSynchronousTtl()
           
 void init(java.util.Properties props)
           
 void setMaxCachedInstances(int maxCachedInstances)
           
 void setSynchronousTtl(long synchronousTTL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketServerConnectionFactory

public SocketServerConnectionFactory()
Method Detail

getInstance

public static SocketServerConnectionFactory getInstance()

init

public void init(java.util.Properties props)

getServerInstance

public SocketServerInstance getServerInstance(HostInfo info,
                                              boolean ssl)
                                       throws CommunicationException,
                                              java.io.IOException
Specified by:
getServerInstance in interface SocketServerInstanceFactory
Throws:
CommunicationException
java.io.IOException

createConnection

public SocketServerConnection createConnection(java.util.Properties connectionProperties)
                                        throws CommunicationException,
                                               ConnectionException
Description copied from interface: ServerConnectionFactory
Establish a connection to the server.

Specified by:
createConnection 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)


Copyright © 2009. All Rights Reserved.