Package jade.imtp.leap.JICP
Class Connection
- java.lang.Object
-
- jade.imtp.leap.JICP.Connection
-
- Direct Known Subclasses:
JICPConnection,NIOJICPConnection
public abstract class Connection extends Object
Abstract base class representing a generic connection that can be used to send/receive JICP packets over the network.- Author:
- Giovanni Caire - TILAB
-
-
Field Summary
Fields Modifier and Type Field Description static intsocketCnt
-
Constructor Summary
Constructors Constructor Description Connection()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidclose()Close the connectionabstract StringgetRemoteHost()abstract JICPPacketreadPacket()Read a JICPPacket from the connectionabstract intwritePacket(JICPPacket pkt)Write a JICPPacket on the connection
-
-
-
Method Detail
-
readPacket
public abstract JICPPacket readPacket() throws IOException
Read a JICPPacket from the connection- Throws:
IOException
-
writePacket
public abstract int writePacket(JICPPacket pkt) throws IOException
Write a JICPPacket on the connection- Throws:
IOException
-
close
public abstract void close() throws IOExceptionClose the connection- Throws:
IOException
-
-