Package org.apache.felix.cm.impl.helper
Class TargetedPID
java.lang.Object
org.apache.felix.cm.impl.helper.TargetedPID
The
TargetedPID class represents a targeted PID as read
from a configuration object.
For a factory configuration the TargetedPID represents
the factory PID of the configuration. Otherwise it represents the
PID itself of the configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the raw PID with which this instance has been created.Returns the service PID of this targeted PID which basically is the targeted PID without the targeting information.inthashCode()booleanmatchesTarget(org.osgi.framework.ServiceReference<?> reference) Returns true if the target of this PID (bundle symbolic name, version, and location) match the bundle registering the referenced service.toString()
-
Constructor Details
-
TargetedPID
-
-
Method Details
-
matchesTarget
public boolean matchesTarget(org.osgi.framework.ServiceReference<?> reference) Returns true if the target of this PID (bundle symbolic name, version, and location) match the bundle registering the referenced service.This method just checks the target not the PID value itself, so this method returning
truedoes not indicate whether the service actually is registered with a service PID equal to the raw PID of this targeted PID.This method also returns
falseif the service has concurrently been unregistered and the registering bundle is nownull.- Parameters:
reference-ServiceReferenceto the registered service- Returns:
trueif the referenced service matches the target of this PID.
-
getRawPid
Gets the raw PID with which this instance has been created.If an actual service PID contains pipe symbols that PID might be considered being targeted PID without it actually being one. This method provides access to the raw PID to allow for such services to be configured.
-
getServicePid
Returns the service PID of this targeted PID which basically is the targeted PID without the targeting information. -
hashCode
public int hashCode() -
equals
-
toString
-