FileDocCategorySizeDatePackage
ConnectionManagerImpl.javaAPI DocAzureus 3.0.3.42916Fri Jul 07 04:27:00 BST 2006org.gudy.azureus2.pluginsimpl.local.network

ConnectionManagerImpl

public class ConnectionManagerImpl extends Object implements org.gudy.azureus2.plugins.network.ConnectionManager

Fields Summary
private static ConnectionManagerImpl
instance
private com.aelitis.azureus.core.AzureusCore
azureus_core
Constructors Summary
private ConnectionManagerImpl(com.aelitis.azureus.core.AzureusCore _core)

  
	  azureus_core	= _core;
  
Methods Summary
public org.gudy.azureus2.plugins.network.ConnectioncreateConnection(java.net.InetSocketAddress remote_address, org.gudy.azureus2.plugins.messaging.MessageStreamEncoder encoder, org.gudy.azureus2.plugins.messaging.MessageStreamDecoder decoder)

	  ConnectionEndpoint connection_endpoint	= new ConnectionEndpoint( remote_address );
	  
	  connection_endpoint.addProtocol( new ProtocolEndpointTCP( remote_address ));
	 
	  com.aelitis.azureus.core.networkmanager.NetworkConnection core_conn =
		  NetworkManager.getSingleton().createConnection( connection_endpoint, new MessageStreamEncoderAdapter( encoder ), new MessageStreamDecoderAdapter( decoder ), false, false, null );
    
	  return new ConnectionImpl( core_conn );
  
public intgetNATStatus()

	  return( azureus_core.getGlobalManager().getNATStatus());
  
public static synchronized org.gudy.azureus2.pluginsimpl.local.network.ConnectionManagerImplgetSingleton(com.aelitis.azureus.core.AzureusCore core)

	  if ( instance == null ){
		  
		  instance = new ConnectionManagerImpl( core );
	  }
	  
	  return( instance );