OSGi™ Service Platform
Release 4 Version 4.2

org.osgi.util.gsm
Class IMEICondition

java.lang.Object
  extended by org.osgi.util.gsm.IMEICondition

public class IMEICondition
extends java.lang.Object

Class representing an IMEI condition. Instances of this class contain a string value that is matched against the IMEI of the device.

ThreadSafe

Method Summary
static Condition getCondition(Bundle bundle, ConditionInfo conditionInfo)
          Creates an IMEI condition object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCondition

public static Condition getCondition(Bundle bundle,
                                     ConditionInfo conditionInfo)
Creates an IMEI condition object.

Parameters:
bundle - This parameter is ignored, as the IMEI number is a property of the mobile device and thus is the same for all bundles.
conditionInfo - Contains the IMEI value against which to match the device's IMEI. Its ConditionInfo.getArgs() method should return a String array with one value: the IMEI string. The IMEI is 15 digits without hyphens. Limited pattern matching is allowed: the string is 0 to 14 digits, followed by an asterisk ( *).
Returns:
A Condition object that indicates whether the specified IMEI number matches that of the device. If the number ends with an asterisk ( *), then the beginning of the IMEI is compared to the pattern.
Throws:
java.lang.IllegalArgumentException - If the IMEI is not a string of 15 digits, or 0 to 14 digits with an * at the end.

OSGi™ Service Platform
Release 4 Version 4.2

Copyright © OSGi Alliance (2000, 2010). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0