|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EnhancementEngineManager
Interface that allows to lookup ServiceReference and
EnhancementEngine services based on the name.
| Method Summary | |
|---|---|
java.util.Set<java.lang.String> |
getActiveEngineNames()
Getter for all active and tracked engine names. |
EnhancementEngine |
getEngine(org.osgi.framework.ServiceReference engineReference)
Getter for the EnhancementEngine service for the parsed
service Reference. |
EnhancementEngine |
getEngine(java.lang.String name)
Getter for the EnhancementEngine for the parsed name |
org.osgi.framework.ServiceReference |
getReference(java.lang.String name)
Getter for the ServiceReference of the EnhancementEngine for the parsed name |
java.util.List<org.osgi.framework.ServiceReference> |
getReferences(java.lang.String name)
Getter for all ServiceReferences of the EnhancementEngines registered for the parsed name. |
boolean |
isEngine(java.lang.String name)
Checks if an EnhancementEngine with the parsed name is active |
| Method Detail |
|---|
org.osgi.framework.ServiceReference getReference(java.lang.String name)
name - The name - MUST NOT be null empty and tracked
by this tracker
ServiceReference or null if no Engine
with the given name is active
java.lang.IllegalArgumentException - if the parsed name is null,
empty or not tracked by this tracker instance.
java.util.List<org.osgi.framework.ServiceReference> getReferences(java.lang.String name)
throws java.lang.IllegalArgumentException
Constants.SERVICE_RANKING.
name - The name - MUST NOT be null empty and tracked
by this tracker
ServiceReferences sorted by
Constants.SERVICE_RANKING with the highest ranking in the first
position. If no engine for the parsed name is active an empty list is
returned.
with the given name is active
java.lang.IllegalArgumentException - if the parsed name is null,
empty or not tracked by this tracker instance.EnhancementEngine getEngine(java.lang.String name)
name - The name - MUST NOT be null empty and tracked
by this tracker
EnhancementEngine or null if no Engine
with the given name is active
java.lang.IllegalArgumentException - if the parsed name is null,
empty or not tracked by this tracker instance.boolean isEngine(java.lang.String name)
EnhancementEngine with the parsed name is active
name - the name
java.lang.IllegalArgumentException - if null or an empty String
is parsed as name.java.util.Set<java.lang.String> getActiveEngineNames()
EnhancementEngines become active/inactive.
Users of this method should keep in mind to check if the
ServiceReferences and/or EnhancementEngines retrieved
by the names in the returned set may no longer be available. Therefore
it is strongly recommended to checks for null values on
results of subsequent calls to getReference(String) or
getEngine(String).
EnhancementEngine getEngine(org.osgi.framework.ServiceReference engineReference)
EnhancementEngine service for the parsed
service Reference. This method allows to also retrieve the service for
other engines than the one with the highest service ranking by using
for(ServiceReference engineRef : tracker.getReferences("test")){
EnhancementEngine engine = tracker.getEngine(engineRef)
if(engine != null) { //may become inactive in the meantime
//save the world by using this engine!
}
}
engineReference - the service reference for an engine tracked by this
component
EnhancementEngine or null
if no longer available.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||