public class SensorManagementServiceImpl extends java.lang.Object implements SensorManagementService
SensorManagementService
Constructor and Description |
---|
SensorManagementServiceImpl()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(java.lang.String sensorName,
java.lang.String childName)
Add a new child to a sensor.
|
void |
addChildren(java.lang.String sensorName,
java.util.Collection<java.lang.String> childNames)
Add several sensors as children to the sensor.
|
void |
bindReader(AbstractSensor<?> reader,
java.util.Dictionary<java.lang.String,java.lang.String> parameters)
Used by spring to bind a new AbstractSensor to this service.
|
void |
createSensor(java.lang.String sensorName)
Create a new sensor.
|
void |
createSensor(java.lang.String sensorName,
java.util.Collection<java.lang.String> childSensors)
Create a new sensor that is already hooked up to other sensors.
|
void |
destroySensor(java.lang.String sensorName)
Destroy a sensor.
|
SensorDTO |
getDTO(java.lang.String sensorName)
Get a serializable representation of the given sensor.
|
java.util.Set<java.lang.String> |
getSensors()
Get the names of all registered sensors.
|
void |
publishToEsper(java.lang.String sensorName)
Publish all reads from a sensor to esper.
|
void |
removeChild(java.lang.String sensorName,
java.lang.String childName)
Remove one child from a sensor.
|
void |
removeChildren(java.lang.String sensorName,
java.util.Collection<java.lang.String> childrenNames)
Remove a number of childrens from a sensor.
|
void |
renameSensor(java.lang.String oldName,
java.lang.String newName)
Change the name of a sensor.
|
void |
setChildren(java.lang.String sensorName,
java.util.Collection<java.lang.String> childNames)
Set the sensor's child sensors.
|
void |
setEsperManager(EsperManagementService esperManager) |
void |
setReader(java.util.Set<AbstractSensor<?>> readers)
Used by spring to give the initial list of readers
|
Sensor |
subscribe(java.lang.Object subscriber,
java.lang.String sensorName)
Subscribe an object to a sensor.
|
void |
unbindReader(AbstractSensor<?> reader,
java.util.Dictionary<java.lang.String,java.lang.String> parameters)
Used by spring to unbind a disappearing AbstractSensor service from this
service.
|
void |
unpublishFromEsper(java.lang.String sensorName)
Dont publish the reads from a given sensor.
|
void |
unsubscribe(java.lang.Object subscriber,
java.lang.String sensorName)
Unsubscribe an object from a sensor.
|
public void createSensor(java.lang.String sensorName, java.util.Collection<java.lang.String> childSensors) throws DuplicateSensorNameException, NoSuchSensorException
SensorManagementService
createSensor
in interface SensorManagementService
DuplicateSensorNameException
NoSuchSensorException
public void destroySensor(java.lang.String sensorName) throws NoSuchSensorException, ImmutableException, InUseException
SensorManagementService
destroySensor
in interface SensorManagementService
NoSuchSensorException
ImmutableException
InUseException
public void createSensor(java.lang.String sensorName) throws DuplicateSensorNameException
SensorManagementService
createSensor
in interface SensorManagementService
DuplicateSensorNameException
public Sensor subscribe(java.lang.Object subscriber, java.lang.String sensorName) throws NoSuchSensorException, DuplicateSubscriptionException
SensorManagementService
subscribe
in interface SensorManagementService
NoSuchSensorException
DuplicateSubscriptionException
public void unsubscribe(java.lang.Object subscriber, java.lang.String sensorName) throws NoSuchSensorException, NotSubscribedException
SensorManagementService
unsubscribe
in interface SensorManagementService
NoSuchSensorException
NotSubscribedException
public void renameSensor(java.lang.String oldName, java.lang.String newName) throws NoSuchSensorException, ImmutableException, InUseException
SensorManagementService
renameSensor
in interface SensorManagementService
NoSuchSensorException
ImmutableException
InUseException
public void addChild(java.lang.String sensorName, java.lang.String childName) throws ImmutableException, InUseException, NoSuchSensorException
SensorManagementService
addChild
in interface SensorManagementService
ImmutableException
InUseException
NoSuchSensorException
public void addChildren(java.lang.String sensorName, java.util.Collection<java.lang.String> childNames) throws ImmutableException, InUseException, NoSuchSensorException
SensorManagementService
addChildren
in interface SensorManagementService
ImmutableException
InUseException
NoSuchSensorException
public void setChildren(java.lang.String sensorName, java.util.Collection<java.lang.String> childNames) throws ImmutableException, InUseException, NoSuchSensorException
SensorManagementService
setChildren
in interface SensorManagementService
ImmutableException
InUseException
NoSuchSensorException
public void removeChild(java.lang.String sensorName, java.lang.String childName) throws ImmutableException, InUseException, NoSuchSensorException
SensorManagementService
removeChild
in interface SensorManagementService
ImmutableException
InUseException
NoSuchSensorException
public void removeChildren(java.lang.String sensorName, java.util.Collection<java.lang.String> childrenNames) throws ImmutableException, InUseException, NoSuchSensorException
SensorManagementService
removeChildren
in interface SensorManagementService
ImmutableException
InUseException
NoSuchSensorException
public java.util.Set<java.lang.String> getSensors()
SensorManagementService
getSensors
in interface SensorManagementService
public void bindReader(AbstractSensor<?> reader, java.util.Dictionary<java.lang.String,java.lang.String> parameters)
reader
- the configuration to bindparameters
- public void unbindReader(AbstractSensor<?> reader, java.util.Dictionary<java.lang.String,java.lang.String> parameters)
reader
- the AbstractSensor to unbindparameters
- public void setReader(java.util.Set<AbstractSensor<?>> readers)
readers
- the initial list of available readerspublic void publishToEsper(java.lang.String sensorName) throws NoSuchSensorException
SensorManagementService
publishToEsper
in interface SensorManagementService
NoSuchSensorException
public void unpublishFromEsper(java.lang.String sensorName) throws NoSuchSensorException
SensorManagementService
unpublishFromEsper
in interface SensorManagementService
NoSuchSensorException
public SensorDTO getDTO(java.lang.String sensorName) throws NoSuchSensorException
SensorManagementService
getDTO
in interface SensorManagementService
NoSuchSensorException
public void setEsperManager(EsperManagementService esperManager)
esperManager
- the esperManager to set