Class SocketClientInstance

  • All Implemented Interfaces:
    ChannelListener, ClientInstance

    public class SocketClientInstance
    extends 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.
    • Constructor Detail

      • SocketClientInstance

        public SocketClientInstance​(org.teiid.net.socket.ObjectChannel objectSocket,
                                    ClientServiceRegistryImpl csr,
                                    boolean isClientEncryptionEnabled)
    • Method Detail

      • send

        public void send​(org.teiid.net.socket.Message message,
                         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 send
        messageKey - The key sent with the asynch query
      • getCryptor

        public org.teiid.core.crypto.Cryptor getCryptor()
        Specified by:
        getCryptor in interface ClientInstance
        Returns:
        Returns the cryptor.
      • onConnection

        public void onConnection()
                          throws org.teiid.net.CommunicationException
        Specified by:
        onConnection in interface ChannelListener
        Throws:
        org.teiid.net.CommunicationException
      • receivedMessage

        public void receivedMessage​(Object msg)
                             throws org.teiid.net.CommunicationException
        Specified by:
        receivedMessage in interface ChannelListener
        Throws:
        org.teiid.net.CommunicationException
      • shutdown

        public void shutdown()
                      throws org.teiid.net.CommunicationException
        Description copied from interface: ClientInstance
        Shutdown the server's connection to the client.
        Specified by:
        shutdown in interface ClientInstance
        Throws:
        org.teiid.net.CommunicationException - If an error occurs during the shutdown
      • getWorkContext

        public org.teiid.dqp.internal.process.DQPWorkContext getWorkContext()
        Specified by:
        getWorkContext in interface ClientInstance