jadex.standalone.transport.tcpmtp
Class TCPInputConnection

java.lang.Object
  extended by jadex.standalone.transport.tcpmtp.TCPInputConnection

public class TCPInputConnection
extends Object

Represents the input connection for a tcp stream.


Field Summary
protected  ClassLoader classloader
          The classloader.
protected  CodecFactory codecfac
          The codec factory.
protected  InputStream is
          The input stream.
protected  Socket sock
          The client socket.
 
Constructor Summary
TCPInputConnection(Socket sock, CodecFactory codecfac, ClassLoader classloader)
          Create a new tcp input connection.
 
Method Summary
 void close()
          Close the connection.
 MessageEnvelope read()
          Receive a message from a socket.
protected  int readByte()
          Read a byte from the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sock

protected Socket sock
The client socket.


is

protected InputStream is
The input stream.


codecfac

protected CodecFactory codecfac
The codec factory.


classloader

protected ClassLoader classloader
The classloader.

Constructor Detail

TCPInputConnection

public TCPInputConnection(Socket sock,
                          CodecFactory codecfac,
                          ClassLoader classloader)
                   throws IOException
Create a new tcp input connection.

Parameters:
sock - The client socket.
Throws:
IOException
Method Detail

read

public MessageEnvelope read()
                     throws IOException
Receive a message from a socket.

Parameters:
accept - The socket.
Throws:
IOException

close

public void close()
Close the connection.


readByte

protected int readByte()
                throws IOException
Read a byte from the stream.

Returns:
A fresh read byte.
Throws:
IOException


Copyright © 2010. All Rights Reserved.