com.metamatrix.common.comm.platform.socket.server
Class SocketClientInstance
java.lang.Object
com.metamatrix.common.comm.platform.socket.server.SocketClientInstance
- All Implemented Interfaces:
- ChannelListener, ClientInstance
public class SocketClientInstance
- extends java.lang.Object
- implements ChannelListener, ClientInstance
Sockets implementation of the communication framework class representing the server's view of a client connection.
Implements the server-side of the sockets messaging protocol.
The client side of the protocol is implemented in SocketServerInstance.
Users of this class are expected to provide a WorkerPool for processing incoming messages. Users must also call read().
Users also provide a ServerListener implementation. The ServerListener is the application level object
processing the application level messages.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketClientInstance
public SocketClientInstance(ObjectChannel objectSocket,
WorkerPool workerPool,
ClientServiceRegistry server,
boolean isClientEncryptionEnabled,
SessionServiceInterface sessionService)
send
public void send(Message message,
java.io.Serializable messageKey)
- Description copied from interface:
ClientInstance
- Send a message to this particular client using the asynch message key.
- Specified by:
send
in interface ClientInstance
- Parameters:
message
- The message to sendmessageKey
- The key sent with the asynch query
getCryptor
public Cryptor getCryptor()
- Specified by:
getCryptor
in interface ClientInstance
- Returns:
- Returns the cryptor.
exceptionOccurred
public void exceptionOccurred(java.lang.Throwable t)
- Specified by:
exceptionOccurred
in interface ChannelListener
onConnection
public void onConnection()
throws CommunicationException
- Specified by:
onConnection
in interface ChannelListener
- Throws:
CommunicationException
receivedMessage
public void receivedMessage(java.lang.Object msg)
throws CommunicationException
- Specified by:
receivedMessage
in interface ChannelListener
- Throws:
CommunicationException
shutdown
public void shutdown()
throws CommunicationException
- Description copied from interface:
ClientInstance
- Shutdown the server's connection to the client.
- Specified by:
shutdown
in interface ClientInstance
- Throws:
CommunicationException
- If an error occurs during the shutdown
getWorkContext
public org.teiid.dqp.internal.process.DQPWorkContext getWorkContext()
- Specified by:
getWorkContext
in interface ClientInstance
Copyright © 2009. All Rights Reserved.