com.espertech.esper.core.service
Class ResultDeliveryStrategyImpl

java.lang.Object
  extended by com.espertech.esper.core.service.ResultDeliveryStrategyImpl
All Implemented Interfaces:
ResultDeliveryStrategy

public class ResultDeliveryStrategyImpl
extends java.lang.Object
implements 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
ResultDeliveryStrategyImpl(java.lang.String statementName, java.lang.Object subscriber, DeliveryConvertor deliveryConvertor, java.lang.reflect.Method method, java.lang.reflect.Method startMethod, java.lang.reflect.Method endMethod, java.lang.reflect.Method rStreamMethod)
          Ctor.
 
Method Summary
 void execute(UniformPair<EventBean[]> result)
          Execute the dispatch.
protected static void handle(java.lang.String statementName, org.apache.commons.logging.Log logger, java.lang.reflect.InvocationTargetException e, java.lang.Object[] parameters, java.lang.Object subscriber, net.sf.cglib.reflect.FastMethod method)
          Handle the exception, displaying a nice message and converting to EPException.
protected static void handleThrowable(org.apache.commons.logging.Log logger, java.lang.Throwable t, java.lang.Object[] parameters, java.lang.Object subscriber, net.sf.cglib.reflect.FastMethod method)
          Handle the exception, displaying a nice message and converting to EPException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultDeliveryStrategyImpl

public ResultDeliveryStrategyImpl(java.lang.String statementName,
                                  java.lang.Object subscriber,
                                  DeliveryConvertor deliveryConvertor,
                                  java.lang.reflect.Method method,
                                  java.lang.reflect.Method startMethod,
                                  java.lang.reflect.Method endMethod,
                                  java.lang.reflect.Method rStreamMethod)
Ctor.

Parameters:
subscriber - is the subscriber receiving method invocations
deliveryConvertor - for converting individual rows
method - to deliver the insert stream to
startMethod - to call to indicate when delivery starts, or null if no such indication is required
endMethod - to call to indicate when delivery ends, or null if no such indication is required
rStreamMethod - to deliver the remove stream to, or null if no such indication is required
Method Detail

execute

public void execute(UniformPair<EventBean[]> result)
Description copied from interface: ResultDeliveryStrategy
Execute the dispatch.

Specified by:
execute in interface ResultDeliveryStrategy
Parameters:
result - is the insert and remove stream to indicate

handle

protected static void handle(java.lang.String statementName,
                             org.apache.commons.logging.Log logger,
                             java.lang.reflect.InvocationTargetException e,
                             java.lang.Object[] parameters,
                             java.lang.Object subscriber,
                             net.sf.cglib.reflect.FastMethod method)
Handle the exception, displaying a nice message and converting to EPException.

Parameters:
logger - is the logger to use for error logging
e - is the exception
parameters - the method parameters
subscriber - the object to deliver to
method - the method to call
Throws:
EPException - converted from the passed invocation exception

handleThrowable

protected static void handleThrowable(org.apache.commons.logging.Log logger,
                                      java.lang.Throwable t,
                                      java.lang.Object[] parameters,
                                      java.lang.Object subscriber,
                                      net.sf.cglib.reflect.FastMethod method)
Handle the exception, displaying a nice message and converting to EPException.

Parameters:
logger - is the logger to use for error logging
t - is the throwable
parameters - the method parameters
subscriber - the object to deliver to
method - the method to call
Throws:
EPException - converted from the passed invocation exception

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com