| Modifier and Type | Class and Description |
|---|---|
| private static class | Service.
Holds the global lazily-loaded instance of the ServicesDB |
| Modifier and Type | Field and Description |
|---|---|
| private final Collection | aliases
All the aliases for this service |
| private final int | port
TCP or UDP port number |
| pack-priv final String | proto
Protocol to use |
| private final String | serviceName
Official service name |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final Collection | Returns: ACollection of Strings for aliases this ServiceGets a list of aliases this |
| public static final Collection | |
| public final String | Returns: The name of thisService as a StringReturns the official IANA name of this |
| public final int | Returns: The port for thisService as an intReturns the official IANA port for this |
| public static final Service | Returns: aService instance, or null if the service could not be found.the official IANA name for the service, or an alias. name, String the protocol for the service. Usually "tcp" or "udp". proto)Locates a service by name and protocol. |
| public static final Service | Returns: aService instance, or null if the service could not be found.the TCP or UDP port of the service. port, String the protocol for the service. Usually "tcp" or "udp". proto)Locates a service by port and protocol. |
| private static final ServicesDB | |
| public String |
| aliases | back to summary |
|---|---|
| private final Collection<String> aliases All the aliases for this service | |
| port | back to summary |
|---|---|
| private final int port TCP or UDP port number | |
| proto | back to summary |
|---|---|
| pack-priv final String proto Protocol to use | |
| serviceName | back to summary |
|---|---|
| private final String serviceName Official service name | |
| Service | back to summary |
|---|---|
| pack-priv Service(String name, int port, String proto, Collection<String> aliases) | |
| getAliases | back to summary |
|---|---|
| public final Collection Gets a list of aliases this
| |
| getAllServices | back to summary |
|---|---|
| public static final Collection Returns a list of all services.
| |
| getName | back to summary |
|---|---|
| public final String getName() Returns the official IANA name of this
| |
| getPort | back to summary |
|---|---|
| public final int getPort() Returns the official IANA port for this
| |
| getServiceByName | back to summary |
|---|---|
| public static final Service getServiceByName(String name, String proto) Locates a service by name and protocol. | |
| getServiceByPort | back to summary |
|---|---|
| public static final Service getServiceByPort(int port, String proto) Locates a service by port and protocol. | |
| getServicesDB | back to summary |
|---|---|
| private static final ServicesDB getServicesDB() Returns the currently loaded ServicesDB
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final ServicesDB |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static final ServicesDB |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final ServicesDB INSTANCE | |
| ServicesDBSingletonHolder | back to summary |
|---|---|
| private ServicesDBSingletonHolder() | |
| load | back to summary |
|---|---|
| private static final ServicesDB load() | |