public abstract class AbstractPacketTransport extends Object implements PacketTransport
Base class for a packet transport
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
client |
protected boolean |
closed |
protected Object |
closeLock |
protected String |
id |
protected PacketTransportListener |
listener |
| Constructor and Description |
|---|
AbstractPacketTransport(String id,
boolean client)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Get the packet transport id
|
boolean |
isClosed()
Test if the transport is closed
|
void |
setListener(PacketTransportListener listener) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getRemotePeerID, needsThrottling, send, startprotected String id
protected PacketTransportListener listener
protected boolean client
protected Object closeLock
protected boolean closed
public AbstractPacketTransport(String id, boolean client)
public final String getId()
PacketTransportgetId in interface PacketTransportpublic boolean isClosed()
PacketTransportisClosed in interface PacketTransportpublic void setListener(PacketTransportListener listener)
setListener in interface PacketTransportlistener - the listener to setCopyright © 2019. All rights reserved.