FileDocCategorySizeDatePackage
DHTPluginContactImpl.javaAPI DocAzureus 3.0.3.42254Thu Jun 28 16:08:26 BST 2007com.aelitis.azureus.plugins.dht.impl

DHTPluginContactImpl

public class DHTPluginContactImpl extends Object implements com.aelitis.azureus.plugins.dht.DHTPluginContact

Fields Summary
private DHTPluginImpl
plugin
private com.aelitis.azureus.core.dht.transport.DHTTransportContact
contact
Constructors Summary
protected DHTPluginContactImpl(DHTPluginImpl _plugin, com.aelitis.azureus.core.dht.transport.DHTTransportContact _contact)

		plugin	= _plugin;
		contact	= _contact;
	
Methods Summary
public java.net.InetSocketAddressgetAddress()

		return( contact.getAddress());
	
protected com.aelitis.azureus.core.dht.transport.DHTTransportContactgetContact()

		return( contact );
	
public java.lang.StringgetName()

		return( contact.getName());
	
public bytegetProtocolVersion()

		return( contact.getProtocolVersion());
	
public booleanisAlive(long timeout)

		return( contact.isAlive( timeout ));
	
public booleanisOrHasBeenLocal()

		return( plugin.isRecentAddress( contact.getAddress().getAddress().getHostAddress()));
	
public java.util.MapopenTunnel()

		DHTNATPuncher puncher = plugin.getDHT().getNATPuncher();
		
		if ( puncher == null ){
			
			return( null );
		}
		
		return( puncher.punch( "Tunnel", contact, null, null ));