Package jnr.netdb
Class IANAServicesDB
- java.lang.Object
-
- jnr.netdb.IANAServicesDB
-
- All Implemented Interfaces:
ServicesDB
final class IANAServicesDB extends java.lang.Object implements ServicesDB
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
IANAServicesDB.ServicesBuilder
private static class
IANAServicesDB.SingletonHolder
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Service>
allServices
private java.util.Map<java.lang.String,Service>
tcpNameToService
private java.util.Map<java.lang.Integer,Service>
tcpPortToService
private java.util.Map<java.lang.String,Service>
udpNameToService
private java.util.Map<java.lang.Integer,Service>
udpPortToService
-
Constructor Summary
Constructors Modifier Constructor Description private
IANAServicesDB(java.util.Map<java.lang.String,Service> tcpNameToService, java.util.Map<java.lang.String,Service> udpNameToService, java.util.Map<java.lang.Integer,Service> tcpServices, java.util.Map<java.lang.Integer,Service> udpServices)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static IANAServicesDB
buildServices()
java.util.List<Service>
getAllServices()
static IANAServicesDB
getInstance()
Service
getServiceByName(java.lang.String name, java.lang.String proto)
Service
getServiceByPort(java.lang.Integer port, java.lang.String proto)
-
-
-
Field Detail
-
tcpPortToService
private final java.util.Map<java.lang.Integer,Service> tcpPortToService
-
udpPortToService
private final java.util.Map<java.lang.Integer,Service> udpPortToService
-
tcpNameToService
private final java.util.Map<java.lang.String,Service> tcpNameToService
-
udpNameToService
private final java.util.Map<java.lang.String,Service> udpNameToService
-
allServices
private final java.util.List<Service> allServices
-
-
Method Detail
-
getInstance
public static final IANAServicesDB getInstance()
-
getServiceByName
public final Service getServiceByName(java.lang.String name, java.lang.String proto)
- Specified by:
getServiceByName
in interfaceServicesDB
-
getServiceByPort
public final Service getServiceByPort(java.lang.Integer port, java.lang.String proto)
- Specified by:
getServiceByPort
in interfaceServicesDB
-
getAllServices
public final java.util.List<Service> getAllServices()
- Specified by:
getAllServices
in interfaceServicesDB
-
buildServices
private static final IANAServicesDB buildServices()
-
-