com.metamatrix.common.comm.platform.socket.client
Class SocketServerInstanceImpl
java.lang.Object
com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl
- All Implemented Interfaces:
- SocketServerInstance
public class SocketServerInstanceImpl
- extends java.lang.Object
- implements SocketServerInstance
Client view of a socket server connection that exposes remote services
On construction this class will create a channel and exchange a handshake.
That handshake will establish a Cryptor
to be used for secure traffic.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketServerInstanceImpl
public SocketServerInstanceImpl()
SocketServerInstanceImpl
public SocketServerInstanceImpl(HostInfo host,
boolean ssl,
long synchTimeout)
connect
public void connect(ObjectChannelFactory channelFactory)
throws CommunicationException,
java.io.IOException
- Throws:
CommunicationException
java.io.IOException
getHostInfo
public HostInfo getHostInfo()
- Specified by:
getHostInfo
in interface SocketServerInstance
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
- Specified by:
getRemoteAddress
in interface SocketServerInstance
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface SocketServerInstance
send
public void send(Message message,
ResultsReceiver<java.lang.Object> listener,
java.io.Serializable messageKey)
throws CommunicationException,
java.lang.InterruptedException
- Throws:
CommunicationException
java.lang.InterruptedException
exceptionOccurred
public void exceptionOccurred(java.lang.Throwable e)
- Send an exception to all clients that are currently waiting for a
response.
receivedMessage
public void receivedMessage(java.lang.Object packet)
shutdown
public void shutdown()
- Specified by:
shutdown
in interface SocketServerInstance
getCryptor
public Cryptor getCryptor()
- Specified by:
getCryptor
in interface SocketServerInstance
- Returns:
- Returns the cryptor.
getService
public <T> T getService(java.lang.Class<T> iface)
- Specified by:
getService
in interface SocketServerInstance
Copyright © 2009. All Rights Reserved.