Package net.timewalker.ffmq4.transport
Interface PacketTransport
-
- All Known Implementing Classes:
AbstractPacketTransport,AbstractTcpPacketTransport,NIOTcpPacketTransport,TcpPacketTransport
public interface PacketTransportPacketTransport
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Stop and close the transport layerStringgetId()Get the packet transport idStringgetRemotePeerID()Get an ID representing the transport remote peerbooleanisClosed()Test if the transport is closedbooleanneedsThrottling()Test if send operation should be throttled down to avoid send queue overflowvoidsend(AbstractPacket packet)Send a packet on this transportvoidsetListener(PacketTransportListener listener)voidstart()Start the transport layer
-
-
-
Method Detail
-
getId
String getId()
Get the packet transport id- Returns:
- the packet transport id
-
start
void start() throws PacketTransportExceptionStart the transport layer- Throws:
PacketTransportException
-
close
void close()
Stop and close the transport layer
-
isClosed
boolean isClosed()
Test if the transport is closed
-
send
void send(AbstractPacket packet) throws PacketTransportException
Send a packet on this transport- Throws:
PacketTransportException
-
needsThrottling
boolean needsThrottling()
Test if send operation should be throttled down to avoid send queue overflow
-
setListener
void setListener(PacketTransportListener listener)
- Parameters:
listener- the listener to set
-
getRemotePeerID
String getRemotePeerID()
Get an ID representing the transport remote peer- Returns:
- an ID representing the remote peer
-
-