Package com.biglybt.plugin.dht.impl
Class DHTPluginContactImpl
- java.lang.Object
-
- com.biglybt.plugin.dht.impl.DHTPluginContactImpl
-
- All Implemented Interfaces:
DHTPluginContact
public class DHTPluginContactImpl extends java.lang.Object implements DHTPluginContact
-
-
Field Summary
Fields Modifier and Type Field Description private DHTTransportContact
contact
private DHTPluginImpl
plugin
-
Constructor Summary
Constructors Modifier Constructor Description protected
DHTPluginContactImpl(DHTPluginImpl _plugin, DHTTransportContact _contact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
call(DHTPluginProgressListener listener, byte[] handler_key, byte[] data, long timeout)
java.util.Map<java.lang.String,java.lang.Object>
exportToMap()
java.net.InetSocketAddress
getAddress()
protected DHTTransportContact
getContact()
DHTPluginImpl
getDHT()
byte[]
getID()
java.lang.String
getName()
int
getNetwork()
byte
getProtocolVersion()
java.lang.String
getString()
boolean
isAlive(long timeout)
void
isAlive(long timeout, DHTPluginOperationListener listener)
boolean
isOrHasBeenLocal()
java.util.Map
openTunnel()
java.util.Map
openTunnel(DHTPluginContact[] rendezvous, java.util.Map client_data)
byte[]
read(DHTPluginProgressListener listener, byte[] handler_key, byte[] key, long timeout)
void
write(DHTPluginProgressListener listener, byte[] handler_key, byte[] key, byte[] data, long timeout)
-
-
-
Field Detail
-
plugin
private DHTPluginImpl plugin
-
contact
private DHTTransportContact contact
-
-
Constructor Detail
-
DHTPluginContactImpl
protected DHTPluginContactImpl(DHTPluginImpl _plugin, DHTTransportContact _contact)
-
-
Method Detail
-
getDHT
public DHTPluginImpl getDHT()
-
getContact
protected DHTTransportContact getContact()
-
getID
public byte[] getID()
- Specified by:
getID
in interfaceDHTPluginContact
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceDHTPluginContact
-
getNetwork
public int getNetwork()
- Specified by:
getNetwork
in interfaceDHTPluginContact
-
getProtocolVersion
public byte getProtocolVersion()
- Specified by:
getProtocolVersion
in interfaceDHTPluginContact
-
getAddress
public java.net.InetSocketAddress getAddress()
- Specified by:
getAddress
in interfaceDHTPluginContact
-
exportToMap
public java.util.Map<java.lang.String,java.lang.Object> exportToMap()
- Specified by:
exportToMap
in interfaceDHTPluginContact
-
isAlive
public boolean isAlive(long timeout)
- Specified by:
isAlive
in interfaceDHTPluginContact
-
isAlive
public void isAlive(long timeout, DHTPluginOperationListener listener)
- Specified by:
isAlive
in interfaceDHTPluginContact
-
isOrHasBeenLocal
public boolean isOrHasBeenLocal()
- Specified by:
isOrHasBeenLocal
in interfaceDHTPluginContact
-
openTunnel
public java.util.Map openTunnel()
- Specified by:
openTunnel
in interfaceDHTPluginContact
-
openTunnel
public java.util.Map openTunnel(DHTPluginContact[] rendezvous, java.util.Map client_data)
-
read
public byte[] read(DHTPluginProgressListener listener, byte[] handler_key, byte[] key, long timeout)
- Specified by:
read
in interfaceDHTPluginContact
-
write
public void write(DHTPluginProgressListener listener, byte[] handler_key, byte[] key, byte[] data, long timeout)
- Specified by:
write
in interfaceDHTPluginContact
-
call
public byte[] call(DHTPluginProgressListener listener, byte[] handler_key, byte[] data, long timeout)
- Specified by:
call
in interfaceDHTPluginContact
-
getString
public java.lang.String getString()
- Specified by:
getString
in interfaceDHTPluginContact
-
-