org.teiid.net.socket
Class SocketServerInstanceImpl

java.lang.Object
  extended by 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.


Nested Class Summary
static class SocketServerInstanceImpl.RemoteInvocationHandler
           
 
Constructor Summary
SocketServerInstanceImpl(HostInfo info, long synchTimeout)
           
 
Method Summary
 void connect(ObjectChannelFactory channelFactory)
           
 Cryptor getCryptor()
           
 HostInfo getHostInfo()
           
 java.lang.String getServerVersion()
           
<T> T
getService(java.lang.Class<T> iface)
           
 long getSynchTimeout()
           
 boolean isOpen()
           
 void read(long timeout, java.util.concurrent.TimeUnit unit, ResultsFuture<?> future)
           
 void send(Message message, ResultsReceiver<java.lang.Object> listener, java.io.Serializable messageKey)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketServerInstanceImpl

public SocketServerInstanceImpl(HostInfo info,
                                long synchTimeout)
Method Detail

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.