Package org.osgi.util.cdma
Class ESNCondition
java.lang.Object
org.osgi.util.cdma.ESNCondition
Class representing an ESN condition. Instances of this class contain a string
value that is matched against the ESN of the device.
- Version:
- $Revision: 6439 $
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.osgi.service.condpermadmin.Condition
getCondition
(org.osgi.framework.Bundle bundle, org.osgi.service.condpermadmin.ConditionInfo conditionInfo) Creates an ESNCondition object.
-
Method Details
-
getCondition
public static org.osgi.service.condpermadmin.Condition getCondition(org.osgi.framework.Bundle bundle, org.osgi.service.condpermadmin.ConditionInfo conditionInfo) Creates an ESNCondition object.- Parameters:
bundle
- This parameter is ignored, as the ESN number is the property of the mobile device, and thus the same for all bundles.conditionInfo
- Contains the ESN value against which to match the device's ESN. ItsConditionInfo.getArgs()
method should return a String array with one value, the ESN string. The ESN is 8 hexadecimal digits (32 bits) without hyphens. Limited pattern matching is allowed: the string is 0 to 7 digits, followed by an asterisk(*
).- Returns:
- A Condition object that indicates whether the specified ESN
number matches that of the device. If the number ends with an
asterisk (
*
), then the beginning of the ESN is compared to the pattern. - Throws:
IllegalArgumentException
- If the ESN is not a string of 8 hexadecimal digits, or 0 to 7 hexadecimal digits with an*
at the end.
-