Class ResultDeliveryStrategyImpl
java.lang.Object
com.espertech.esper.runtime.internal.subscriber.ResultDeliveryStrategyImpl
- All Implemented Interfaces:
ResultDeliveryStrategy
A result delivery strategy that uses a matching "update" method and
optional start, end, and updateRStream methods, to deliver column-wise to parameters
of the update method.
-
Constructor Summary
ConstructorDescriptionResultDeliveryStrategyImpl
(EPStatement statement, Object subscriber, DeliveryConvertor deliveryConvertor, Method method, Method startMethod, Method endMethod, Method rStreamMethod, com.espertech.esper.common.internal.settings.ClasspathImportService classpathImportService) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(com.espertech.esper.common.internal.collection.UniformPair<com.espertech.esper.common.client.EventBean[]> result) Execute the dispatch.protected static void
handle
(String statementName, org.slf4j.Logger logger, ReflectiveOperationException e, Object[] parameters, Object subscriber, Method method) Handle the exception, displaying a nice message and converting toEPException
.protected static void
handleThrowable
(org.slf4j.Logger logger, Throwable t, Object[] parameters, Object subscriber, Method method) Handle the exception, displaying a nice message and converting toEPException
.
-
Constructor Details
-
ResultDeliveryStrategyImpl
public ResultDeliveryStrategyImpl(EPStatement statement, Object subscriber, DeliveryConvertor deliveryConvertor, Method method, Method startMethod, Method endMethod, Method rStreamMethod, com.espertech.esper.common.internal.settings.ClasspathImportService classpathImportService) Ctor.- Parameters:
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
- statementclasspathImportService
- runtime imports
-
-
Method Details
-
execute
public void execute(com.espertech.esper.common.internal.collection.UniformPair<com.espertech.esper.common.client.EventBean[]> result) Description copied from interface:ResultDeliveryStrategy
Execute the dispatch.- Specified by:
execute
in interfaceResultDeliveryStrategy
- Parameters:
result
- is the insert and remove stream to indicate
-
handle
protected static void handle(String statementName, org.slf4j.Logger logger, ReflectiveOperationException e, Object[] parameters, Object subscriber, Method method) Handle the exception, displaying a nice message and converting toEPException
.- Parameters:
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 name- Throws:
com.espertech.esper.common.client.EPException
- converted from the passed invocation exception
-
handleThrowable
protected static void handleThrowable(org.slf4j.Logger logger, Throwable t, Object[] parameters, Object subscriber, Method method) Handle the exception, displaying a nice message and converting toEPException
.- Parameters:
logger
- is the logger to use for error loggingt
- is the throwableparameters
- the method parameterssubscriber
- the object to deliver tomethod
- the method to call- Throws:
com.espertech.esper.common.client.EPException
- converted from the passed invocation exception
-