Mobile Sensor API Version 1.2

javax.microedition.sensor.control
Interface Controllable


public interface Controllable

The Controllable represents a sensor which can be controlled with the controls provided. For the sensor to be controllable, it MUST implement this interface and set the value of the property SensorInfo.PROP_IS_CONTROLLABLE to Boolean.TRUE.


Method Summary
 Control getControl(java.lang.String name)
          The method returns the Control object matching the given name.
 Control[] getControls()
          The method returns all available, unique Control objects of the sensor.
 

Method Detail

getControl

Control getControl(java.lang.String name)

The method returns the Control object matching the given name. With the same name, the same Control object MUST always be returned.

The name of the control MUST be the same as the fully-qualified name of the class. There are four examples of controls in this specification breaking this rule, the names for these controls are:

  1. MeasurementRangeControl
  2. SampleRateControl
  3. StartControl
  4. StopControl

Parameters:
name - the name of the control.
Returns:
the Control object matching the given name
Throws:
java.lang.IllegalArgumentException - if the given name does not match any of the controls provided
java.lang.NullPointerException - if the name is null

getControls

Control[] getControls()

The method returns all available, unique Control objects of the sensor.

Returns:
a Control array, at least one Control object MUST be returned.

Mobile Sensor API Version 1.2

Copyright © 2005-2008 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.