com.buglabs.bug.module.motion.pub
Class AccelerationWS

java.lang.Object
  extended by com.buglabs.bug.module.motion.pub.AccelerationWS
All Implemented Interfaces:
PublicWSProvider, PublicWSProvider2

public class AccelerationWS
extends java.lang.Object
implements PublicWSProvider2

A web service for acceleration data.


Field Summary
 
Fields inherited from interface com.buglabs.services.ws.PublicWSProvider
DELETE, GET, PACKAGE_ID, POST, PUT
 
Constructor Summary
AccelerationWS(IAccelerometerSampleProvider acc, LogService log)
           
 
Method Summary
 PublicWSDefinition discover(int operation)
           
 IWSResponse execute(int operation, java.lang.String input)
          Execute a service.
 java.lang.String getDescription()
           
 java.lang.String getPublicName()
           
 void setPublicName(java.lang.String name)
          Set the name of the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccelerationWS

public AccelerationWS(IAccelerometerSampleProvider acc,
                      LogService log)
Method Detail

discover

public PublicWSDefinition discover(int operation)
Specified by:
discover in interface PublicWSProvider
Parameters:
operation - HTTP operation. See IPublicServiceProvider.GET, etc.
Returns:
The description of what the service requires and provides.

execute

public IWSResponse execute(int operation,
                           java.lang.String input)
Description copied from interface: PublicWSProvider
Execute a service. This is a proxy to a native OSGi style service.

Specified by:
execute in interface PublicWSProvider
Parameters:
operation - PublicWSProvider.GET, .PUT, .POST, .DELETE
Returns:

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface PublicWSProvider
Returns:
A brief description of the service.

getPublicName

public java.lang.String getPublicName()
Specified by:
getPublicName in interface PublicWSProvider
Returns:
Name that this service uses.

setPublicName

public void setPublicName(java.lang.String name)
Description copied from interface: PublicWSProvider2
Set the name of the service. This can be done on registration.

Specified by:
setPublicName in interface PublicWSProvider2