jadex.standalone.transport.niotcpmtp
Class NIOTCPInputConnection

java.lang.Object
  extended by jadex.standalone.transport.niotcpmtp.NIOTCPInputConnection

public class NIOTCPInputConnection
extends Object

The input connection (channel) for incoming requests.


Field Summary
protected  ClassLoader classloader
          The classloader.
protected  byte codec_id
          The codec id.
protected  CodecFactory codecfac
          The codec factory.
protected  int msg_end
          The current message length (-1 for none).
protected  ByteBuffer readbuffer
          The read buffer for reading out the messages.
protected  SocketChannel sc
          The socket channel for receiving messages.
protected  ByteBuffer writebuffer
          The write buffer for the channel.
 
Constructor Summary
NIOTCPInputConnection(SocketChannel sc, CodecFactory codecfac, ClassLoader classloader)
          Constructor for InputConnection.
 
Method Summary
 void close()
          Close the connection.
 MessageEnvelope read()
          Read a message from the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sc

protected SocketChannel sc
The socket channel for receiving messages.


writebuffer

protected ByteBuffer writebuffer
The write buffer for the channel.


readbuffer

protected ByteBuffer readbuffer
The read buffer for reading out the messages.


msg_end

protected int msg_end
The current message length (-1 for none).


codec_id

protected byte codec_id
The codec id.


codecfac

protected CodecFactory codecfac
The codec factory.


classloader

protected ClassLoader classloader
The classloader.

Constructor Detail

NIOTCPInputConnection

public NIOTCPInputConnection(SocketChannel sc,
                             CodecFactory codecfac,
                             ClassLoader classloader)
Constructor for InputConnection.

Parameters:
sc -
dec -
Throws:
IOException
Method Detail

read

public MessageEnvelope read()
                     throws IOException
Read a message from the channel.

Returns:
The message if a complete message is finished.
Throws:
Exception - on read error.
IOException

close

public void close()
Close the connection.



Copyright © 2010. All Rights Reserved.