public abstract class JetstreamEventService
extends java.lang.Object
Constructor and Description |
---|
JetstreamEventService()
Uses the information in the service.properties file located at the root
directory of the implementing project to create a new instance of the
JetstreamEventService.
|
JetstreamEventService(java.io.File properties)
Uses the information in the file passed to the constructor to create a
new instance of the JetstreamEventService.
|
JetstreamEventService(java.lang.String baseURI,
java.lang.String accessKey,
long windowTime)
Uses the information passed to the constructor to create a new instance
of the JetstreamEventServcie
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccessKey()
Returns the access key being used by the service
|
java.lang.String |
getBaseUri()
Returns the base uri currently being used by the servcie to communicate
with Jetstream
|
long |
getWindowTime()
Returns the amount of time in milliseconds between event polling
|
protected abstract void |
processAggregateEvent(AggregateEvent aggregateEvent)
Abstract method for processing a new Aggregate Event
|
protected abstract void |
processCommandCompletionEvent(CommandCompletionEvent commandCompletionEvent)
Abstract method for processing a new Command Completion Event
|
protected abstract void |
processCommandQueuedEvent(CommandQueuedEvent commandQueuedEvent)
Abstract method for processing a new Command Queued Event
|
protected abstract void |
processDeviceFailureEvent(DeviceFailureEvent deviceFailureEvent)
Abstract method for processing a new Device Failure Event
|
protected abstract void |
processDeviceRestoreEvent(DeviceRestoreEvent deviceRestoreEvent)
Abstract method for processing a new Device Restore Event
|
protected abstract void |
processHeartbeatEvent(HeartbeatEvent heartbeatEvent)
Abstract method for processing a new Heartbeat Event
|
protected abstract void |
processLogEntryEvent(LogEntryEvent logEntryEvent)
Abstract method for processing a new Log Entry Event
|
protected abstract void |
processLogicalDeviceAddedEvent(LogicalDeviceAddedEvent logicalDeviceAddedEvent)
Abstract method for processing a new Logical Device Added Event
|
protected abstract void |
processLogicalDeviceRemovedEvent(LogicalDeviceRemovedEvent logicalDeviceRemovedEvent)
Abstract method for processing a new Logical Device Removed Event
|
protected abstract void |
processObjectEvent(ObjectEvent objectEvent)
Abstract method for processing a new Object Event
|
protected abstract void |
processSensorReadingEvent(SensorReadingEvent sensorReadingEvent)
Abstract method for processing a new Sensor Reading Event
|
protected abstract void |
processServiceException(JetstreamResponseException exception)
Method for processing exceptions thrown by the service
|
protected abstract void |
processUnknownMessage(java.lang.String message)
Abstract method for processing an unknown message
|
void |
StartProcesses()
Starts the JetstreamEventService
|
void |
StopProcesses()
Stops the JetstreamEventService
|
public JetstreamEventService()
java.lang.IllegalArgumentException
public JetstreamEventService(java.io.File properties)
properties
- The properties file containing the information to setup a new
JetstreamEventServicejava.lang.IllegalArgumentException
public JetstreamEventService(java.lang.String baseURI, java.lang.String accessKey, long windowTime)
baseURI
- The baseURI used to communicate with JetstreamaccessKey
- The user access key for the application you are usingwindowTime
- The amount of time in milliseconds between event pollingjava.lang.IllegalArgumentException
public java.lang.String getBaseUri()
public java.lang.String getAccessKey()
public long getWindowTime()
public void StartProcesses()
public void StopProcesses()
protected abstract void processAggregateEvent(AggregateEvent aggregateEvent)
aggregateEvent
- Deserialized AggregateEvent message in the xsd.exe object
modelAggregateEvent
protected abstract void processCommandCompletionEvent(CommandCompletionEvent commandCompletionEvent)
commandCompletionEvent
- Deserialized CommandCompletionEvent message in the xsd.exe
object modelCommandCompletionEvent
protected abstract void processCommandQueuedEvent(CommandQueuedEvent commandQueuedEvent)
commandQueuedEvent
- Deserialized CommandQueuedEvent message in the xsd.exe object
modelCommandQueuedEvent
protected abstract void processDeviceFailureEvent(DeviceFailureEvent deviceFailureEvent)
deviceFailureEvent
- Deserialized DeviceFailureEvent message in the xsd.exe object
modelDeviceFailureEvent
protected abstract void processDeviceRestoreEvent(DeviceRestoreEvent deviceRestoreEvent)
deviceRestoreEvent
- Deserialized DeviceRestoreEvent message in the xsd.exe object
modelDeviceRestoreEvent
protected abstract void processHeartbeatEvent(HeartbeatEvent heartbeatEvent)
heartbeatEvent
- Deserialized HeartbeatEvent message in the xsd.exe object
modelHeartbeatEvent
protected abstract void processLogEntryEvent(LogEntryEvent logEntryEvent)
logEntryEvent
- Deserialized LogEntryEvent message in the xsd.exe object modelLogEntryEvent
protected abstract void processLogicalDeviceAddedEvent(LogicalDeviceAddedEvent logicalDeviceAddedEvent)
logicalDeviceAddedEvent
- Deserialized LogicalDeviceAddedEvent in the xsd.exe object
modelLogicalDeviceAddedEvent
protected abstract void processLogicalDeviceRemovedEvent(LogicalDeviceRemovedEvent logicalDeviceRemovedEvent)
logicalDeviceRemovedEvent
- Deserialized LogicalDeviceRemovedEvent in the xsd.exe object
modelLogicalDeviceRemovedEvent
protected abstract void processObjectEvent(ObjectEvent objectEvent)
objectEvent
- Deserialized ObjectEvent in the xsd.exe object modelObjectEvent
protected abstract void processSensorReadingEvent(SensorReadingEvent sensorReadingEvent)
sensorReadingEvent
- Deserialized SensorReadingEvent in the xsd.exe object modelSensorReadingEvent
protected abstract void processUnknownMessage(java.lang.String message)
message
- String representing the unknown messageprotected abstract void processServiceException(JetstreamResponseException exception)
exception
- The JetstreamResponseExceptioin thrown by the serviceJetstreamResponseException