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 initialize(java.util.Properties info)
           
 boolean isAlive()
          Is the connection factory alive
 void setMaxCachedInstances(int maxCachedInstances)
           
 void setSynchronousTtl(long synchronousTTL)
           
 void shutdown(boolean restart)
          Shutdown the connection factory, including the DQP and all its existing connections
 
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()

initialize

public void initialize(java.util.Properties info)
Specified by:
initialize in interface ServerConnectionFactory

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)

shutdown

public void shutdown(boolean restart)
Description copied from interface: ServerConnectionFactory
Shutdown the connection factory, including the DQP and all its existing connections

Specified by:
shutdown in interface ServerConnectionFactory

isAlive

public boolean isAlive()
Description copied from interface: ServerConnectionFactory
Is the connection factory alive

Specified by:
isAlive in interface ServerConnectionFactory
Returns:
true if alive; false otherwise.


Copyright © 2009. All Rights Reserved.