public class ServiceSchemeRegistry extends Object implements Iterable<ServiceScheme>
ServiceSchemeRegistry provides a mechanism manage a collection of ServiceSchemes together with the ability to search the registry for said ServiceSchemes, either by name or service name.
ServiceSchemeRegistrys are Iterable, the order of iteration being the order in which the ServiceSchemes where added to the said ServiceSchemeRegistry.
| Constructor and Description |
|---|
ServiceSchemeRegistry()
Constructs a
ServiceSchemeRegistry. |
| Modifier and Type | Method and Description |
|---|---|
ServiceScheme |
findSchemeBySchemeName(String sSchemeName)
Attempts to locate a
ServiceScheme registered with the specified Scheme.getSchemeName(). |
ServiceScheme |
findSchemeByServiceName(String sServiceName)
Attempts to locate a
ServiceScheme registered with the specified ServiceScheme.getServiceName() giving preference to "autostart" schemes. |
Iterator<ServiceScheme> |
iterator() |
void |
register(ServiceScheme scheme)
Attempts to register the specified
ServiceScheme. |
int |
size()
Determines the number of
Schemes registered with the ServiceSchemeRegistry. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ServiceSchemeRegistry()
ServiceSchemeRegistry.public Iterator<ServiceScheme> iterator()
iterator in interface Iterable<ServiceScheme>public void register(ServiceScheme scheme)
ServiceScheme.scheme - the ServiceScheme to registerIllegalArgumentException - if a ServiceScheme with the same scheme and/or service name has already been registeredpublic ServiceScheme findSchemeBySchemeName(String sSchemeName)
ServiceScheme registered with the specified Scheme.getSchemeName().sSchemeName - the scheme of the ServiceScheme to findServiceScheme or null if not registeredpublic ServiceScheme findSchemeByServiceName(String sServiceName)
ServiceScheme registered with the specified ServiceScheme.getServiceName() giving preference to "autostart" schemes.sServiceName - the service name of ServiceScheme to findServiceScheme or null if not registeredpublic int size()
Schemes registered with the ServiceSchemeRegistry.Schemes