se.entra.phantom.server
Interface ClientCommunicationInterface

All Superinterfaces:
SocketNameInterface
All Known Implementing Classes:
HttpSession, HttpTunnelingCommunication, SocketClientCommunication

public interface ClientCommunicationInterface
extends SocketNameInterface

The manager for all threaded client sessions that clients can connect to.


Method Summary
 void close()
          Closes an open client connection.
 InetAddress getClientInetAddress()
          Gets the address of the client.
 InetAddress getServerInetAddress()
          Gets the address of the server.
 ServerSocketInterface getServerSocket()
          Gets the server socket interface associated with the accept of this socket.
 Socket getSocket()
          Gets socket associated with this communication.
 byte[] receiveTransaction()
          Reads a transaction from the client.
 void sendTransaction(byte[] data)
          Sends a transaction to the client.
 
Methods inherited from interface se.entra.phantom.server.SocketNameInterface
getClientDNSName, getClientIPAddress
 

Method Detail

getClientInetAddress

InetAddress getClientInetAddress()
Gets the address of the client.


getServerInetAddress

InetAddress getServerInetAddress()
Gets the address of the server.


receiveTransaction

byte[] receiveTransaction()
                          throws IOException
Reads a transaction from the client. This call is blocking until the transaction has been read.

Throws:
IOException

sendTransaction

void sendTransaction(byte[] data)
                     throws IOException
Sends a transaction to the client. This call is blocking until the transaction has been sent.

Throws:
IOException

close

void close()
Closes an open client connection.


getSocket

Socket getSocket()
Gets socket associated with this communication.

Returns:
null if no socket is available.

getServerSocket

ServerSocketInterface getServerSocket()
Gets the server socket interface associated with the accept of this socket.

Returns:
null if no server socket is available.


Phantom® and NetPhantom® are registered trademarks of Codectica Systems SARL.
© Copyright Codectica Systems SARL, 2008. All rights reserved.