LimeWire Consolidated API

org.limewire.io
Interface IpPort

All Known Subinterfaces:
Connectable, Connection, PushEndpoint, ReplyHandler, RoutedConnection, Uploader
All Known Implementing Classes:
AbstractConnection, AbstractPushEndpoint, AbstractUploader, BTUploader, ConnectableImpl, Endpoint, EndpointData, ExtendedEndpoint, ForMeReplyHandler, GnutellaConnection, GUESSEndpoint, HTTPUploader, IpPortForSelf, IpPortImpl, PingReplyImpl, PushEndpointImpl, SelfEndpoint, TorrentLocation, UDPReplyHandler

public interface IpPort

Defines the interface for an object to return an InetAddress, port as an integer and the host address as a string.


Nested Class Summary
static class IpPort.IpComparator
          An IpPort Comparator that only looks at the IP portion, not the port.
static class IpPort.IpPortComparator
          Compares IpPort objects.
 
Field Summary
static Comparator<IpPort> COMPARATOR
          The sole comparator to use for IpPort objects.
static List<IpPort> EMPTY_LIST
          An empty list, casted to an IpPort.
static Set<IpPort> EMPTY_SET
          An empty set, casted to an IpPort.
static Comparator<IpPort> IP_COMPARATOR
          Comparator for IpPort objects that ignores the port.
 
Method Summary
 String getAddress()
          Assessor for the address string.
 InetAddress getInetAddress()
          Assessor for the InetAddress for this host.
 InetSocketAddress getInetSocketAddress()
          Accessor for the InetSocketAddress that can describe the IP & Port.
 int getPort()
          Assessor for the port this host is listening on.
 

Field Detail

IP_COMPARATOR

static final Comparator<IpPort> IP_COMPARATOR
Comparator for IpPort objects that ignores the port.


COMPARATOR

static final Comparator<IpPort> COMPARATOR
The sole comparator to use for IpPort objects.


EMPTY_LIST

static final List<IpPort> EMPTY_LIST
An empty list, casted to an IpPort.


EMPTY_SET

static final Set<IpPort> EMPTY_SET
An empty set, casted to an IpPort.

Method Detail

getInetAddress

InetAddress getInetAddress()
Assessor for the InetAddress for this host.

Returns:
the InetAddress for this host

getPort

int getPort()
Assessor for the port this host is listening on.

Returns:
the port this host is listening on

getAddress

String getAddress()
Assessor for the address string.

Returns:
the address of this host as a string

getInetSocketAddress

InetSocketAddress getInetSocketAddress()
Accessor for the InetSocketAddress that can describe the IP & Port.

Returns:
the InetSocketAddress of this host.

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.