Package org.teiid.net.socket
Class SocketServerInstanceImpl
- java.lang.Object
-
- org.teiid.net.socket.SocketServerInstanceImpl
-
- All Implemented Interfaces:
SocketServerInstance
public class SocketServerInstanceImpl extends 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 aCryptor
to be used for secure traffic.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SocketServerInstanceImpl.RemoteInvocationHandler
-
Constructor Summary
Constructors Constructor Description SocketServerInstanceImpl(HostInfo info, long synchTimeout, int soTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(ObjectChannelFactory channelFactory)
Cryptor
getCryptor()
HostInfo
getHostInfo()
InetAddress
getLocalAddress()
String
getServerVersion()
<T> T
getService(Class<T> iface)
long
getSynchTimeout()
boolean
isOpen()
void
read(long timeout, TimeUnit unit, ResultsFuture<?> future)
void
send(Message message, ResultsReceiver<Object> listener, Serializable messageKey)
void
shutdown()
-
-
-
Constructor Detail
-
SocketServerInstanceImpl
public SocketServerInstanceImpl(HostInfo info, long synchTimeout, int soTimeout)
-
-
Method Detail
-
connect
public void connect(ObjectChannelFactory channelFactory) throws CommunicationException, IOException
- Throws:
CommunicationException
IOException
-
getHostInfo
public HostInfo getHostInfo()
- Specified by:
getHostInfo
in interfaceSocketServerInstance
-
getLocalAddress
public InetAddress getLocalAddress()
- Specified by:
getLocalAddress
in interfaceSocketServerInstance
-
getServerVersion
public String getServerVersion()
- Specified by:
getServerVersion
in interfaceSocketServerInstance
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfaceSocketServerInstance
-
send
public void send(Message message, ResultsReceiver<Object> listener, Serializable messageKey) throws CommunicationException, InterruptedException
- Specified by:
send
in interfaceSocketServerInstance
- Throws:
CommunicationException
InterruptedException
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceSocketServerInstance
-
getCryptor
public Cryptor getCryptor()
- Specified by:
getCryptor
in interfaceSocketServerInstance
- Returns:
- Returns the cryptor.
-
read
public void read(long timeout, TimeUnit unit, ResultsFuture<?> future) throws TimeoutException, InterruptedException
- Specified by:
read
in interfaceSocketServerInstance
- Throws:
TimeoutException
InterruptedException
-
getService
public <T> T getService(Class<T> iface)
- Specified by:
getService
in interfaceSocketServerInstance
-
getSynchTimeout
public long getSynchTimeout()
- Specified by:
getSynchTimeout
in interfaceSocketServerInstance
-
-