org.teiid.net.socket
Class SocketServerInstanceImpl
java.lang.Object
org.teiid.net.socket.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(HostInfo info,
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
getServerVersion
public java.lang.String getServerVersion()
- Specified by:
getServerVersion
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
- Specified by:
send
in interface SocketServerInstance
- Throws:
CommunicationException
java.lang.InterruptedException
shutdown
public void shutdown()
- Specified by:
shutdown
in interface SocketServerInstance
getCryptor
public Cryptor getCryptor()
- Specified by:
getCryptor
in interface SocketServerInstance
- Returns:
- Returns the cryptor.
read
public void read(long timeout,
java.util.concurrent.TimeUnit unit,
ResultsFuture<?> future)
throws java.util.concurrent.TimeoutException,
java.lang.InterruptedException
- Specified by:
read
in interface SocketServerInstance
- Throws:
java.util.concurrent.TimeoutException
java.lang.InterruptedException
getService
public <T> T getService(java.lang.Class<T> iface)
- Specified by:
getService
in interface SocketServerInstance
getSynchTimeout
public long getSynchTimeout()
- Specified by:
getSynchTimeout
in interface SocketServerInstance
Copyright © 2011. All Rights Reserved.