FileDocCategorySizeDatePackage
PeerForeignNetworkConnection.javaAPI DocAzureus 3.0.3.46488Tue Jul 17 18:03:12 BST 2007org.gudy.azureus2.pluginsimpl.local.peers

PeerForeignNetworkConnection

public class PeerForeignNetworkConnection extends com.aelitis.azureus.core.networkmanager.NetworkConnectionHelper

Fields Summary
private com.aelitis.azureus.core.networkmanager.ConnectionEndpoint
endpoint
private org.gudy.azureus2.plugins.peers.Peer
peer
private com.aelitis.azureus.core.networkmanager.OutgoingMessageQueue
outgoing_message_queue
private com.aelitis.azureus.core.networkmanager.IncomingMessageQueue
incoming_message_queue
private com.aelitis.azureus.core.networkmanager.TransportBase
transport_base
Constructors Summary
protected PeerForeignNetworkConnection(org.gudy.azureus2.plugins.peers.Peer _peer)

			
	
	
				 
	
		peer	= _peer;
		
			// make up a vaguely usable endpoint
		
		endpoint = new ConnectionEndpoint(new InetSocketAddress( peer.getIp(), peer.getPort()));
	
Methods Summary
public com.aelitis.azureus.core.networkmanager.ConnectionEndpointgetEndpoint()

		return( endpoint );
	
public com.aelitis.azureus.core.networkmanager.IncomingMessageQueuegetIncomingMessageQueue()

		return( incoming_message_queue );
	
public intgetMssSize()

		return( NetworkManager.getMinMssSize() );
	
public com.aelitis.azureus.core.networkmanager.OutgoingMessageQueuegetOutgoingMessageQueue()

		return( outgoing_message_queue );
	
public java.lang.StringgetString()

		String	peer_str = peer.getClass().getName();
		
		int	pos = peer_str.lastIndexOf('.");
		
		if ( pos != -1 ){
			
			peer_str = peer_str.substring( pos+1 );
		}
		
		peer_str += " " + peer.getIp() + ":" + peer.getPort();
		
		return( "peer=" + peer_str + ",in=" + incoming_message_queue.getPercentDoneOfCurrentMessage() + 
				",out=" + outgoing_message_queue.getTotalSize());
	
public com.aelitis.azureus.core.networkmanager.TransportBasegetTransportBase()

		return( transport_base );
	
public booleanisLANLocal()

		return( false );
	
public voidnotifyOfException(java.lang.Throwable error)

		Debug.printStackTrace( error );