Package jade.imtp.leap.JICP
Class JICPPeer
- java.lang.Object
-
- jade.imtp.leap.JICP.JICPPeer
-
- All Implemented Interfaces:
ICP,ProtocolManager
- Direct Known Subclasses:
HTTPPeer,JICPSPeer,MaskableJICPPeer,NIOJICPPeer
public class JICPPeer extends Object implements ICP, ProtocolManager
Class declaration- Author:
- Giovanni Caire - TILAB, Jamie Lawrence - Broadcom Eireann Research, Ronnie Taib - Motorola, Nicolas Lhuillier - Motorola
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jade.imtp.leap.ICP
ICP.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONNECTION_TIMEOUTstatic StringREAD_TIMEOUT
-
Constructor Summary
Constructors Constructor Description JICPPeer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportAddressactivate(ICP.Listener l, String peerID, Profile p)Start listening for internal platform messages on the specified portvoiddeactivate()stop listening for internal platform messagesbyte[]deliverCommand(TransportAddress ta, byte[] payload, boolean requireFreshConnection)deliver a serialized command to a given transport addressConnectionFactorygetConnectionFactory()Subclasses may re-define this method to return their own ConnectionFactoryTransportProtocolgetProtocol()Subclasses may re-define this method to return their own protocolprotected ServerSocketgetServerSocket(String host, int port, boolean changePortIfBusy)
-
-
-
Field Detail
-
CONNECTION_TIMEOUT
public static final String CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
-
READ_TIMEOUT
public static final String READ_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
public TransportAddress activate(ICP.Listener l, String peerID, Profile p) throws ICPException
Start listening for internal platform messages on the specified port- Specified by:
activatein interfaceICP- Throws:
ICPException
-
deactivate
public void deactivate() throws ICPExceptionstop listening for internal platform messages- Specified by:
deactivatein interfaceICP- Throws:
ICPException
-
deliverCommand
public byte[] deliverCommand(TransportAddress ta, byte[] payload, boolean requireFreshConnection) throws ICPException
deliver a serialized command to a given transport address- Specified by:
deliverCommandin interfaceICP- Throws:
ICPException
-
getProtocol
public TransportProtocol getProtocol()
Subclasses may re-define this method to return their own protocol- Specified by:
getProtocolin interfaceICP- Specified by:
getProtocolin interfaceProtocolManager
-
getConnectionFactory
public ConnectionFactory getConnectionFactory()
Subclasses may re-define this method to return their own ConnectionFactory- Specified by:
getConnectionFactoryin interfaceProtocolManager
-
getServerSocket
protected ServerSocket getServerSocket(String host, int port, boolean changePortIfBusy) throws ICPException
- Throws:
ICPException
-
-