public class AccelerationBridge extends BaseSensorBridge implements IAcceleration, APIBridge
apiGroup| Constructor and Description |
|---|
AccelerationBridge(IAcceleration delegate)
Constructor with delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAccelerationListener(IAccelerationListener listener)
Register a new listener that will receive acceleration events.
|
IAcceleration |
getDelegate()
Get the delegate implementation.
|
APIResponse |
invoke(APIRequest request)
Invokes the given method specified in the API request object.
|
void |
removeAccelerationListener(IAccelerationListener listener)
De-registers an existing listener from receiving acceleration events.
|
void |
removeAccelerationListeners()
Removed all existing listeners from receiving acceleration events.
|
void |
setDelegate(IAcceleration delegate)
Set the delegate implementation.
|
getAPIGroup, getAPIVersion, getJSONParserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAPIGroup, getAPIVersionpublic AccelerationBridge(IAcceleration delegate)
delegate - The delegate implementing platform specific functions.public final IAcceleration getDelegate()
public final void setDelegate(IAcceleration delegate)
delegate - The delegate implementing platform specific functions.public void addAccelerationListener(IAccelerationListener listener)
addAccelerationListener in interface IAccelerationlistener - to be registered.public void removeAccelerationListener(IAccelerationListener listener)
removeAccelerationListener in interface IAccelerationlistener - to be registered.public void removeAccelerationListeners()
removeAccelerationListeners in interface IAccelerationpublic APIResponse invoke(APIRequest request)
invoke in interface APIBridgeinvoke in class BaseSensorBridgerequest - APIRequest object containing method name and parameters.