FileDocCategorySizeDatePackage
GenericMessageEndpointImpl.javaAPI DocAzureus 3.0.3.42657Fri Jul 07 04:27:00 BST 2006org.gudy.azureus2.pluginsimpl.local.messaging

GenericMessageEndpointImpl

public class GenericMessageEndpointImpl extends Object implements org.gudy.azureus2.plugins.messaging.generic.GenericMessageEndpoint

Fields Summary
private com.aelitis.azureus.core.networkmanager.ConnectionEndpoint
ce
Constructors Summary
public GenericMessageEndpointImpl(com.aelitis.azureus.core.networkmanager.ConnectionEndpoint _ce)

		ce		= _ce;
	
public GenericMessageEndpointImpl(InetSocketAddress _ne)

		ce		= new ConnectionEndpoint( _ne );
	
Methods Summary
public voidaddTCP(java.net.InetSocketAddress target)

		ce.addProtocol( new ProtocolEndpointTCP( target ));
	
public voidaddUDP(java.net.InetSocketAddress target)

		ce.addProtocol( new ProtocolEndpointUDP( target ));
	
protected com.aelitis.azureus.core.networkmanager.ConnectionEndpointgetConnectionEndpoint()

		return( ce );
	
public java.net.InetSocketAddressgetNotionalAddress()

		return( ce.getNotionalAddress());
	
public java.net.InetSocketAddressgetTCP()

		ProtocolEndpoint[]	pes = ce.getProtocols();
		
		for (int i=0;i<pes.length;i++){
			
			if ( pes[i] instanceof ProtocolEndpointTCP ){
				
				return( ((ProtocolEndpointTCP)pes[i]).getAddress());
			}
		}
			
		return( null );
	
public java.net.InetSocketAddressgetUDP()

		ProtocolEndpoint[]	pes = ce.getProtocols();
		
		for (int i=0;i<pes.length;i++){
			
			if ( pes[i] instanceof ProtocolEndpointUDP ){
				
				return( ((ProtocolEndpointUDP)pes[i]).getAddress());
			}
		}
			
		return( null );