|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ChainManager
Interface that allows to lookup ServiceReference and
Chain services based on the name.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CHAIN_NAME
The name of the default fault Chain as used by the algorithm to
determine the Chain returned by getDefault(). |
| Method Summary | |
|---|---|
java.util.Set<java.lang.String> |
getActiveChainNames()
Getter for the names of all currently active enhancement chains. |
Chain |
getChain(org.osgi.framework.ServiceReference chainReference)
Getter for the Chain service for the parsed
service Reference. |
Chain |
getChain(java.lang.String name)
Getter for the Chain with the highest Constants.SERVICE_RANKING
registered for the parsed name. |
Chain |
getDefault()
Getter for the default Chain. |
org.osgi.framework.ServiceReference |
getReference(java.lang.String name)
Getter for the ServiceReference of the Chain for the parsed name |
java.util.List<org.osgi.framework.ServiceReference> |
getReferences(java.lang.String name)
Getter for all ServiceReferences of the Chains registered for the parsed name. |
boolean |
isChain(java.lang.String name)
Checks if at least a single Chain with the parsed name is currently registered as OSGI service. |
| Field Detail |
|---|
static final java.lang.String DEFAULT_CHAIN_NAME
Chain as used by the algorithm to
determine the Chain returned by getDefault().See the specification of enhancement chains for details.
| Method Detail |
|---|
java.util.Set<java.lang.String> getActiveChainNames()
Chains become
active/inactive.
Users of this method should keep in mind to check if the
ServiceReferences and/or Chains 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
getChain(String).
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 Chain
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 chain 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.Chain getChain(java.lang.String name)
Constants.SERVICE_RANKING
registered for the parsed name.
name - the name of the Chain
null if no Chain with this name is
registered as OSGI service.
java.lang.IllegalArgumentException - if null or an empty String
is parsed as name.Chain getChain(org.osgi.framework.ServiceReference chainReference)
Chain service for the parsed
service Reference. This method allows to also retrieve the service for
other chains than the one with the highest service ranking by using
for(ServiceReference chainRef : tracker.getReferences("test")){
Chain chain = tracker.getChain(chainRef)
if(chain != null) { //may become inactive in the meantime
//start the catastrophic chain of events that caused the Big Bang
}
}
chainReference - the service reference for a tracked chain
Chain or null
if no longer available.boolean isChain(java.lang.String name)
name - the name
java.lang.IllegalArgumentException - if null or an empty String
is parsed as name.Chain getDefault()
ContentItem if the no Chain was explicitly parsed in the
enhancement request.
The default Chain is the Chain with the value of the property
Chain.PROPERTY_NAME is equals to DEFAULT_CHAIN_NAME and
the highest .
If no Chain with the name "default" exists the Chain with the highest
service ranking (regardless of its name) is considered the default Chain.
Constants.SERVICE_RANKING
null if no Chain is available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||