|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fossilec.odettej.transport.tcp.TCPTransport
org.fossilec.odettej.transport.mbgw.MoreDataBitTransport
public class MoreDataBitTransport
This is a transport implementation of the More Data Bit protocol for
tunneling TCP/IP packages over X.25. It control the streaming sequence of
bytes over TCP/IP transmission using a header flag. In this implementation
it's done by overriding send()
and receive()
methods from the TCPTransport
class.
The More Data Bit protocol is required for using OdetteJ with TCP/IP - X.25 gateways. It have been specific used with Access equipments by Microtronix (http://www.microtronix.com/).
Transport
Constructor Summary | |
---|---|
MoreDataBitTransport()
Default constructor. |
|
MoreDataBitTransport(java.nio.channels.SocketChannel channel)
Creates a new class instance providing an existing SocketChannel. |
Method Summary | |
---|---|
int |
receive(java.nio.ByteBuffer dest)
Control the receiving More Data Bit packet headers using parent's receive() method. |
int |
send(java.nio.ByteBuffer buffer)
Send a buffer using the More Data Bit control header. |
Methods inherited from class org.fossilec.odettej.transport.tcp.TCPTransport |
---|
connect, connect, disconnect, getChannel, getLocalAddress, getRemoteAddress, isConnected, send |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoreDataBitTransport()
TCPTransport.TCPTransport()
public MoreDataBitTransport(java.nio.channels.SocketChannel channel) throws OdetteFTPException
OdetteFTPException
TCPTransport.TCPTransport(SocketChannel)
Method Detail |
---|
public int receive(java.nio.ByteBuffer dest) throws OdetteFTPException
receive()
method. More information on this method function
see TCPTransport.receive(ByteBuffer)
for details.
receive
in interface Transport
receive
in class TCPTransport
dest
- The buffer into which bytes are to be transferred
-1
if the channel has reached end-of-stream
NotConnectedException
- Transport not yet connected
OdetteFTPException
- Thrown by unexpected exceptionTCPTransport.receive(ByteBuffer)
public int send(java.nio.ByteBuffer buffer) throws OdetteFTPException
TCPTransport.send(ByteBuffer)
.
send
in interface Transport
send
in class TCPTransport
buffer
- The buffer from which bytes are to be retrieved
NotConnectedException
- Transport not yet connected
OdetteFTPException
- unexpected exceptionTCPTransport.send(ByteBuffer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |