Package jade.imtp.leap.JICP
Class JICPConnection
- java.lang.Object
-
- jade.imtp.leap.JICP.Connection
-
- jade.imtp.leap.JICP.JICPConnection
-
- Direct Known Subclasses:
JICPSConnection
public class JICPConnection extends Connection
Class declaration- Author:
- Steffen Rusitschka - Siemens
-
-
Field Summary
Fields Modifier and Type Field Description protected InputStreamisprotected static LoggermyLoggerprotected OutputStreamosprotected Socketsc-
Fields inherited from class jade.imtp.leap.JICP.Connection
socketCnt
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJICPConnection()JICPConnection(TransportAddress ta)JICPConnection(TransportAddress ta, int timeout)Constructor declarationJICPConnection(TransportAddress ta, int timeout, String bindHost, int bindPort)JICPConnection(Socket s)Constructor declaration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbindSocket(Socket sc)voidclose()Close the connectionStringgetLocalHost()intgetLocalPort()protected OutputStreamgetOutputStream()StringgetRemoteHost()JICPPacketreadPacket()Read a JICPPacket from the connectionvoidsetReadTimeout(int timeout)intwritePacket(JICPPacket pkt)Write a JICPPacket on the connection
-
-
-
Field Detail
-
sc
protected Socket sc
-
myLogger
protected static Logger myLogger
-
is
protected InputStream is
-
os
protected OutputStream os
-
-
Constructor Detail
-
JICPConnection
protected JICPConnection()
-
JICPConnection
public JICPConnection(TransportAddress ta) throws IOException
- Throws:
IOException
-
JICPConnection
public JICPConnection(TransportAddress ta, int timeout) throws IOException
Constructor declaration- Throws:
IOException
-
JICPConnection
public JICPConnection(TransportAddress ta, int timeout, String bindHost, int bindPort) throws IOException
- Throws:
IOException
-
JICPConnection
public JICPConnection(Socket s)
Constructor declaration
-
-
Method Detail
-
setReadTimeout
public void setReadTimeout(int timeout) throws IOException- Throws:
IOException
-
bindSocket
protected void bindSocket(Socket sc)
-
readPacket
public JICPPacket readPacket() throws IOException
Description copied from class:ConnectionRead a JICPPacket from the connection- Specified by:
readPacketin classConnection- Throws:
IOException
-
writePacket
public int writePacket(JICPPacket pkt) throws IOException
Description copied from class:ConnectionWrite a JICPPacket on the connection- Specified by:
writePacketin classConnection- Throws:
IOException
-
getOutputStream
protected OutputStream getOutputStream() throws IOException
- Throws:
IOException
-
close
public void close() throws IOExceptionDescription copied from class:ConnectionClose the connection- Specified by:
closein classConnection- Throws:
IOException
-
getRemoteHost
public String getRemoteHost() throws Exception
- Specified by:
getRemoteHostin classConnection- Throws:
Exception
-
getLocalHost
public String getLocalHost()
-
getLocalPort
public int getLocalPort()
-
-