com.apama.epl.plugin
Class Correlator

java.lang.Object
  extended by com.apama.epl.plugin.Correlator

public class Correlator
extends java.lang.Object

Static class to allow java plugins to interact with the correlator. This class must only be used from an EPL Java plugin. (Not from JMon)


Method Summary
static void enqueue(java.lang.String evt)
          Enqueues the supplied string to all public contexts.
static void enqueueTo(java.lang.String evt, Context c)
          Enqueues the supplied string to the specified context.
static void pluginMethodBlocking()
          Methods declared as non-blocking can opt to block by calling this method.
static void sendTo(java.lang.String evt, Channel c)
          Sends the supplied string to the specified Channel.
static void sendTo(java.lang.String evt, Context... c)
          Sends the supplied string to the specified contexts.
static void sendTo(java.lang.String evt, Context c)
          Sends the supplied string to the specified context.
static void sendTo(java.lang.String evt, java.lang.String channel)
          Sends the supplied string to the specified channel name.
static void subscribe(EventHandler handler, java.lang.String... channels)
          Subscribes a callback handler for events sent to the given channels.
static void unsubscribe(EventHandler handler)
          Unsubscribes a handler from all channels.
static void unsubscribe(EventHandler handler, java.lang.String... channels)
          Unsubscribes a handler from some channels.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

enqueue

public static void enqueue(java.lang.String evt)
Enqueues the supplied string to all public contexts.


enqueueTo

public static void enqueueTo(java.lang.String evt,
                             Context c)
Enqueues the supplied string to the specified context. The context ref can only be passed into the plugin or retrieved as the current context.

See Also:
Context, Context.getCurrent()

sendTo

public static void sendTo(java.lang.String evt,
                          Context c)
Sends the supplied string to the specified context. The context ref can only be passed into the plugin or retrieved as the current context.

See Also:
Context, Context.getCurrent()

sendTo

public static void sendTo(java.lang.String evt,
                          java.lang.String channel)
Sends the supplied string to the specified channel name.


sendTo

public static void sendTo(java.lang.String evt,
                          Channel c)
Sends the supplied string to the specified Channel.

See Also:
Channel

sendTo

public static void sendTo(java.lang.String evt,
                          Context... c)
Sends the supplied string to the specified contexts. The context refs can only be passed into the plugin or retrieved as the current context.

See Also:
Context, Context.getCurrent()

subscribe

public static void subscribe(EventHandler handler,
                             java.lang.String... channels)
Subscribes a callback handler for events sent to the given channels. The handleEvent method on the handler will be called with the event string and the channel to which it was sent on a correlator worker thread. If this handler is already subscribed to channels, the extra channels will be added.


unsubscribe

public static void unsubscribe(EventHandler handler,
                               java.lang.String... channels)
Unsubscribes a handler from some channels.


unsubscribe

public static void unsubscribe(EventHandler handler)
Unsubscribes a handler from all channels.


pluginMethodBlocking

public static void pluginMethodBlocking()
Methods declared as non-blocking can opt to block by calling this method.



Submit a bug or feature
Copyright (c) 2013-2014 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.