com.espertech.esperio.ext
Class SenderThreadPool

java.lang.Object
  extended by com.espertech.esperio.AbstractSender
      extended by com.espertech.esperio.DirectSender
          extended by com.espertech.esperio.ext.SenderThreadPool

public class SenderThreadPool
extends DirectSender

Implementation of Sender to send to esper engine using a thread pool

Author:
Jerry Shea

Field Summary
 
Fields inherited from class com.espertech.esperio.AbstractSender
runtime
 
Constructor Summary
SenderThreadPool(java.util.concurrent.ExecutorService executorService)
          Ctor.
SenderThreadPool(int threadPoolSize)
          Ctor.
 
Method Summary
 void sendEvent(java.util.Map mapToSend, java.lang.String eventTypeName)
          Send an event.
 void sendEvent(java.lang.Object beanToSend)
          Send an event.
 
Methods inherited from class com.espertech.esperio.DirectSender
onFinish, sendEvent, sendEvent
 
Methods inherited from class com.espertech.esperio.AbstractSender
setRuntime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SenderThreadPool

public SenderThreadPool(int threadPoolSize)
Ctor.

Parameters:
threadPoolSize - size of pool

SenderThreadPool

public SenderThreadPool(java.util.concurrent.ExecutorService executorService)
Ctor.

Parameters:
executorService - threadpool to use
Method Detail

sendEvent

public void sendEvent(java.lang.Object beanToSend)
Send an event.

Parameters:
beanToSend - event to send

sendEvent

public void sendEvent(java.util.Map mapToSend,
                      java.lang.String eventTypeName)
Send an event.

Parameters:
mapToSend - event to send
eventTypeName - name of event type

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