public class CEPSystemProcessor extends Module implements DataReceiver, DataEmitter
"select * from type_name" type of queries.
The type_name can be any alias listed in CEPDataTypes or any valid Java class name
Module Features
| Capabilities | Data Emitter, Data Receiver |
|---|---|
| DataFlow Request Parameters | String: The CEP query |
| Stops data flows | No |
| Start Operation | Does nothing |
| Stop Operation | Does nothing |
| Management Interface | None |
| Factory | CEPSystemFactory |
mTypeLookupMap is a mapping of all expected types to underlying classes (ie string --> class)
for the purposes of doing the 'select * from alias' querymRequestMap - map of RequestID --> pair of {class, DataEmitterSupport}. Given a requestID,
we can get the class and corresponding emitter registered to listen on that type. For cancels,
we pull out all the classes, and remove the emitter subscribed to listen on that event type| Modifier | Constructor and Description |
|---|---|
protected |
CEPSystemProcessor(ModuleURN inURN,
boolean inAutoStart) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(DataFlowID inFlowID,
RequestID inRequestID)
Find the request, and go through all its types and remove all the
DataEmitterSupport
object associated with it |
protected Class<?> |
getClassForRequest(String className)
Checks to see if we are looking at an alias or a fully-qualified class name.
|
protected void |
preStart() |
protected void |
preStop() |
void |
receiveData(DataFlowID inFlowID,
Object inData)
Map the incoming data to some type, find the list of all
DataEmitterSupport objects
and send the data on its way there
Ignore the flowID
This is a very inefficient implementation - just iterate over all known requests
and if we find a match send the data that way |
void |
requestData(DataRequest inRequest,
DataEmitterSupport inSupport) |
getCreated, getLastStartFailure, getLastStopFailure, getStarted, getState, getStopped, getURN, isAutoCreated, isAutoStartprotected CEPSystemProcessor(ModuleURN inURN, boolean inAutoStart)
protected void preStart()
throws ModuleException
preStart in class ModuleModuleExceptionprotected void preStop()
throws ModuleException
preStop in class ModuleModuleExceptionpublic void receiveData(DataFlowID inFlowID, Object inData) throws ReceiveDataException
DataEmitterSupport objects
and send the data on its way there
Ignore the flowID
This is a very inefficient implementation - just iterate over all known requests
and if we find a match send the data that wayreceiveData in interface DataReceiverReceiveDataExceptionpublic void requestData(DataRequest inRequest, DataEmitterSupport inSupport) throws RequestDataException
requestData in interface DataEmitterRequestDataExceptionpublic void cancel(DataFlowID inFlowID, RequestID inRequestID)
DataEmitterSupport
object associated with itcancel in interface DataEmitterCopyright © 2017. All Rights Reserved.