public class ResultDeliveryStrategyImpl extends Object implements ResultDeliveryStrategy
Constructor and Description |
---|
ResultDeliveryStrategyImpl(EPStatement statement,
Object subscriber,
DeliveryConvertor deliveryConvertor,
Method method,
Method startMethod,
Method endMethod,
Method rStreamMethod,
EngineImportService engineImportService)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(UniformPair<EventBean[]> result)
Execute the dispatch.
|
protected static void |
handle(String statementName,
org.slf4j.Logger logger,
InvocationTargetException e,
Object[] parameters,
Object subscriber,
net.sf.cglib.reflect.FastMethod method)
Handle the exception, displaying a nice message and converting to
EPException . |
protected static void |
handleThrowable(org.slf4j.Logger logger,
Throwable t,
Object[] parameters,
Object subscriber,
net.sf.cglib.reflect.FastMethod method)
Handle the exception, displaying a nice message and converting to
EPException . |
public ResultDeliveryStrategyImpl(EPStatement statement, Object subscriber, DeliveryConvertor deliveryConvertor, Method method, Method startMethod, Method endMethod, Method rStreamMethod, EngineImportService engineImportService)
subscriber
- is the subscriber receiving method invocationsdeliveryConvertor
- for converting individual rowsmethod
- to deliver the insert stream tostartMethod
- to call to indicate when delivery starts, or null if no such indication is requiredendMethod
- to call to indicate when delivery ends, or null if no such indication is requiredrStreamMethod
- to deliver the remove stream to, or null if no such indication is requiredstatement
- statementengineImportService
- engine importspublic void execute(UniformPair<EventBean[]> result)
ResultDeliveryStrategy
execute
in interface ResultDeliveryStrategy
result
- is the insert and remove stream to indicateprotected static void handle(String statementName, org.slf4j.Logger logger, InvocationTargetException e, Object[] parameters, Object subscriber, net.sf.cglib.reflect.FastMethod method)
EPException
.logger
- is the logger to use for error logginge
- is the exceptionparameters
- the method parameterssubscriber
- the object to deliver tomethod
- the method to callstatementName
- statement nameEPException
- converted from the passed invocation exceptionprotected static void handleThrowable(org.slf4j.Logger logger, Throwable t, Object[] parameters, Object subscriber, net.sf.cglib.reflect.FastMethod method)
EPException
.logger
- is the logger to use for error loggingt
- is the throwableparameters
- the method parameterssubscriber
- the object to deliver tomethod
- the method to callEPException
- converted from the passed invocation exception