public class SensorManagerServiceImpl extends java.lang.Object implements SensorManagerService
Constructor and Description |
---|
SensorManagerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createReader(java.lang.String readerConfigurationFactoryID,
javax.management.AttributeList readerConfigurationProperties)
Creates a new Reader for the supplied configuration.
|
java.lang.String |
createReader(java.lang.String readerConfigurationFactoryID,
javax.management.AttributeList readerConfigurationProperties,
java.lang.String serviceID)
Creates a new Reader for the supplied configuration.
|
java.util.Set<SessionDTO> |
createSession(java.lang.String readerID)
Create a new session on the reader.
|
void |
deleteReader(java.lang.String readerConfigurationID)
Remove a Reader from the Edge Server
|
void |
deleteSession(java.lang.String readerID,
java.lang.String sessionID)
Delete a reader session
|
ReaderDTO |
getReader(java.lang.String readerConfigurationID)
This method returns the DTO for a particular reader
|
javax.management.MBeanInfo |
getReaderDescription(java.lang.String readerConfigurationFactoryID)
Gets a description of a Reader.
|
java.util.Set<ReaderFactoryDTO> |
getReaderFactories()
These are the ReaderFactories that are available on the server
|
ReaderFactoryDTO |
getReaderFactory(java.lang.String readerFactoryID)
This returns the ReaderFactoryDTO for the given readerFactoryID
|
java.util.Set<ReaderDTO> |
getReaders()
This method gets the readers that are currently available on the server
|
SessionDTO |
getSession(java.lang.String readerID,
java.lang.String sessionID)
Get a session with the given IDs
|
void |
killCommand(java.lang.String readerID,
java.lang.String sessionID,
java.lang.Integer processID)
Stop a repeated command.
|
void |
setCommandDAO(CommandDAO commandDAO)
Called by spring to set the commandDAO
|
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setReaderDAO(ReaderDAO readerConfigDAO)
Used by spring to set the ReaderConfigDAO
|
void |
setReaderProperties(java.lang.String readerConfigurationID,
javax.management.AttributeList readerConfigurationProperties)
This method is used to update the properties of a Reader.
|
void |
startSession(java.lang.String readerID,
java.lang.String sessionID)
Starts a session on the reader
|
void |
stopSession(java.lang.String readerID,
java.lang.String sessionID)
Stops a session
|
void |
submitCommand(java.lang.String readerID,
java.lang.String sessionID,
java.lang.String commandID,
java.lang.Long repeatInterval,
java.util.concurrent.TimeUnit timeUnit)
Submit a command for execution on the reader.
|
public java.lang.String createReader(java.lang.String readerConfigurationFactoryID, javax.management.AttributeList readerConfigurationProperties)
SensorManagerService
createReader
in interface SensorManagerService
readerConfigurationFactoryID
- the ID of the ReaderRactoryreaderConfigurationProperties
- all the properties to set on the new Readerpublic java.lang.String createReader(java.lang.String readerConfigurationFactoryID, javax.management.AttributeList readerConfigurationProperties, java.lang.String serviceID) throws java.lang.Exception
SensorManagerService
createReader
in interface SensorManagerService
readerConfigurationFactoryID
- the ID of the ReaderRactoryreaderConfigurationProperties
- all the properties to set on the new ReaderserviceID
- the required service id to be set on readerjava.rmi.RemoteException
java.lang.Exception
public void deleteReader(java.lang.String readerConfigurationID)
SensorManagerService
deleteReader
in interface SensorManagerService
readerConfigurationID
- the ID of the Readerpublic java.util.Set<ReaderFactoryDTO> getReaderFactories()
SensorManagerService
getReaderFactories
in interface SensorManagerService
public ReaderFactoryDTO getReaderFactory(java.lang.String readerFactoryID)
SensorManagerService
getReaderFactory
in interface SensorManagerService
readerFactoryID
- The ReaderFactoryID to returnpublic java.util.Set<ReaderDTO> getReaders()
SensorManagerService
getReaders
in interface SensorManagerService
public javax.management.MBeanInfo getReaderDescription(java.lang.String readerConfigurationFactoryID)
SensorManagerService
getReaderDescription
in interface SensorManagerService
readerConfigurationFactoryID
- the ID of the ReaderFactorypublic ReaderDTO getReader(java.lang.String readerConfigurationID)
SensorManagerService
getReader
in interface SensorManagerService
readerConfigurationID
- The ID of the Reader to getpublic SessionDTO getSession(java.lang.String readerID, java.lang.String sessionID)
SensorManagerService
getSession
in interface SensorManagerService
readerID
- The ID of the reader that contains the sessionsessionID
- The ID of the sessionpublic java.util.Set<SessionDTO> createSession(java.lang.String readerID)
SensorManagerService
createSession
in interface SensorManagerService
public void deleteSession(java.lang.String readerID, java.lang.String sessionID)
SensorManagerService
deleteSession
in interface SensorManagerService
readerID
- The ID of the reader which has the sessionsessionID
- The session to deletepublic void killCommand(java.lang.String readerID, java.lang.String sessionID, java.lang.Integer processID)
SensorManagerService
killCommand
in interface SensorManagerService
readerID
- The reader to usesessionID
- The session to useprocessID
- The command to killpublic void startSession(java.lang.String readerID, java.lang.String sessionID)
SensorManagerService
startSession
in interface SensorManagerService
readerID
- The reader to usesessionID
- The session to startpublic void stopSession(java.lang.String readerID, java.lang.String sessionID)
SensorManagerService
stopSession
in interface SensorManagerService
readerID
- The reader to usesessionID
- The session to stoppublic void submitCommand(java.lang.String readerID, java.lang.String sessionID, java.lang.String commandID, java.lang.Long repeatInterval, java.util.concurrent.TimeUnit timeUnit) throws CommandSubmissionException
SensorManagerService
submitCommand
in interface SensorManagerService
readerID
- The reader to usesessionID
- The session to usecommandID
- The command to userepeatInterval
- How often the command should be repeated. If 0, this command
will only be executed oncetimeUnit
- Which time unit to use for the repeatInterval. Ignored if
repeatInterval is set to 0CommandSubmissionException
public void setReaderProperties(java.lang.String readerConfigurationID, javax.management.AttributeList readerConfigurationProperties)
SensorManagerService
setReaderProperties
in interface SensorManagerService
readerConfigurationID
- the ID of the Reader to updatereaderConfigurationProperties
- the new properties to setpublic void setReaderDAO(ReaderDAO readerConfigDAO)
readerDAO
- the readerDAO to setpublic void setConfigurationService(ConfigurationService configurationService)
configurationService
- the configurationService to setpublic void setCommandDAO(CommandDAO commandDAO)
commandDAO
- the commandDAO to set