|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjnr.netdb.Service
public final class Service
Holds information about TCP and UDP services on a host.
Method Summary | |
---|---|
Collection<String> |
getAliases()
Gets a list of aliases this Service is also known as. |
static Collection<Service> |
getAllServices()
Returns a list of all services. |
String |
getName()
Returns the official IANA name of this Service |
int |
getPort()
Returns the official IANA port for this Service |
static Service |
getServiceByName(String name,
String proto)
Locates a service by name and protocol. |
static Service |
getServiceByPort(int port,
String proto)
Locates a service by port and protocol. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static final Service getServiceByName(String name, String proto)
name
- the official IANA name for the service, or an alias.proto
- the protocol for the service. Usually "tcp" or "udp".
Service
instance, or null
if the service could not be found.public static final Service getServiceByPort(int port, String proto)
port
- the TCP or UDP port of the service.proto
- the protocol for the service. Usually "tcp" or "udp".
Service
instance, or null
if the service could not be found.public static final Collection<Service> getAllServices()
Collection
of Service
instances.public final String getName()
Service
Service
as a String
public final int getPort()
Service
Service
as an int
public final Collection<String> getAliases()
Service
is also known as.
Collection
of Strings for aliases this Service
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |