| Modifier and Type | Class and Description |
|---|---|
| public static enum | ServiceLocatorFactory.
Tells the create method what to do if an existing ServiceLocator with the given name exists |
| Modifier and Type | Field and Description |
|---|---|
| private static ServiceLocatorFactory |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | addListener(ServiceLocatorListener
The non-null listener to add to the system listener)Adds a service listener to the unordered set of listeners that will be notified when named listeners are added or removed from the system. |
| public abstract ServiceLocator | |
| public abstract ServiceLocator | Returns: The created or found named ServiceLocatorThe name of this service locator. Passing a null
name will result in a newly created service locator with a
generated name and that will not be tracked by the system name, ServiceLocator The parent of this ServiceLocator. Services can
be found in the parent (and all grand-parents). May be null
if the returned ServiceLocator should not be parented parent)Creates or finds a ServiceLocator. |
| public abstract ServiceLocator | Returns: The created or found named ServiceLocatorThe name of this service locator. Passing a null
name will result in a newly created service locator with a
generated name and that will not be tracked by the system name, ServiceLocator The parent of this ServiceLocator. Services can
be found in the parent (and all grand-parents). May be null
if the returned ServiceLocator should not be parented parent, ServiceLocatorGenerator An implementation of the generator interface that
can be used to provide an implementation of ServiceLocator. If
null then the generator used will be discovered from the OSGi
service registry or from META-INF/services generator)Creates or finds a ServiceLocator. |
| public abstract ServiceLocator | Returns: The created or found named ServiceLocatorThe name of this service locator. Passing a null
name will result in a newly created service locator with a
generated name and that will not be tracked by the system name, ServiceLocator The parent of this ServiceLocator. Services can
be found in the parent (and all grand-parents). May be null
if the returned ServiceLocator should not be parented parent, ServiceLocatorGenerator An implementation of the generator interface that
can be used to provide an implementation of ServiceLocator. If
null then the generator used will be discovered from the OSGi
service registry or from META-INF/services generator, ServiceLocatorFactory.The policy that should be used if there is an
existing locator with the non-null name. If null the policy
of RETURN will be used policyCreates a ServiceLocator. |
| public abstract void | |
| public abstract void | destroy(ServiceLocator
The ServiceLocator to destroy. If null this will do nothing.
If the ServiceLocator given was already destroyed this will do nothing locator)Removes the given ServiceLocator All services associated with this ServiceLocator will be shutdown |
| public abstract ServiceLocator | |
| public static ServiceLocatorFactory | Returns: The factory to use to create service locatorsThis will return a factory where the ServiceLocatorGenerator is discovered from the META-INF/services of the process |
| public abstract void | removeListener(ServiceLocatorListener
The non-null listener to remove from the system listener)Removes a service listener from the set of listeners that are notified when named listeners are added or removed from the system |
| INSTANCE | back to summary |
|---|---|
| private static ServiceLocatorFactory INSTANCE | |
| ServiceLocatorFactory | back to summary |
|---|---|
| public ServiceLocatorFactory() | |
| addListener | back to summary |
|---|---|
| public abstract void addListener(ServiceLocatorListener listener) Adds a service listener to the unordered set of listeners that will be notified when named listeners are added or removed from the system. If this listener is already registered this method does nothing
| |
| create | back to summary |
|---|---|
| public abstract ServiceLocator create(String name) Creates (or finds) a ServiceLocator. If there is already a ServiceLocator with the given name then this method will return that locator.
| |
| create | back to summary |
|---|---|
| public abstract ServiceLocator create(String name, ServiceLocator parent) Creates or finds a ServiceLocator. If there is already a ServiceLocator with the given name then this method will return that ServiceLocator. The parent argument will be ignored in that case
| |
| create | back to summary |
|---|---|
| public abstract ServiceLocator create(String name, ServiceLocator parent, ServiceLocatorGenerator generator) Creates or finds a ServiceLocator. If there is already a ServiceLocator with the given name then this method will return that ServiceLocator. The parent argument will be ignored in that case. If a null name is given then a new ServiceLocator with a generated name will be returned.
| |
| create | back to summary |
|---|---|
| public abstract ServiceLocator create(String name, ServiceLocator parent, ServiceLocatorGenerator generator, ServiceLocatorFactory. Creates a ServiceLocator. If there is already a ServiceLocator with the given name then this method will honor the given CreatePolicy. return that ServiceLocator. The policies are
| |
| destroy | back to summary |
|---|---|
| public abstract void destroy(String name) Removes the ServiceLocator with this name All services associated with this ServiceLocator will be shutdown
| |
| destroy | back to summary |
|---|---|
| public abstract void destroy(ServiceLocator locator) Removes the given ServiceLocator All services associated with this ServiceLocator will be shutdown
| |
| find | back to summary |
|---|---|
| public abstract ServiceLocator find(String name) Finds the ServiceLocator with this name
| |
| getInstance | back to summary |
|---|---|
| public static ServiceLocatorFactory getInstance() This will return a factory where the ServiceLocatorGenerator is discovered from the META-INF/services of the process
| |
| removeListener | back to summary |
|---|---|
| public abstract void removeListener(ServiceLocatorListener listener) Removes a service listener from the set of listeners that are notified when named listeners are added or removed from the system
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ServiceLocatorFactory. | DESTROY
Destroy the existing ServiceLocator |
| public static final ServiceLocatorFactory. | ERROR
Throw an IllegalStateException |
| public static final ServiceLocatorFactory. | RETURN
Return the existing ServiceLocator |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ServiceLocatorFactory. | |
| public static ServiceLocatorFactory. |
| DESTROY | back to summary |
|---|---|
| public static final ServiceLocatorFactory. Destroy the existing ServiceLocator | |
| ERROR | back to summary |
|---|---|
| public static final ServiceLocatorFactory. Throw an IllegalStateException | |
| RETURN | back to summary |
|---|---|
| public static final ServiceLocatorFactory. Return the existing ServiceLocator | |
| CreatePolicy | back to summary |
|---|---|
| private CreatePolicy() | |
| valueOf | back to summary |
|---|---|
| public static ServiceLocatorFactory. | |
| values | back to summary |
|---|---|
| public static ServiceLocatorFactory. | |