com.espertech.esper.adapter
Class BaseSubscription

java.lang.Object
  extended by com.espertech.esper.adapter.BaseSubscription
All Implemented Interfaces:
Subscription, FilterHandle, FilterHandleCallback

public abstract class BaseSubscription
extends java.lang.Object
implements Subscription, FilterHandleCallback

Subscription is a concept for selecting events for processing out of all events available from an engine instance.


Field Summary
protected  OutputAdapter adapter
          The output adapter to which the subscription applies.
protected  java.lang.String eventTypeName
          The event type of the events we are subscribing for.
protected  java.lang.String subscriptionName
          The name of the subscription.
 
Constructor Summary
BaseSubscription()
          Ctor, assigns default name.
 
Method Summary
 OutputAdapter getAdapter()
          Returns the output adapter this subscription is associated with.
 java.lang.String getEventTypeName()
          Returns the type name of the event type we are looking for.
 java.lang.String getSubscriptionName()
          Returns the subscription name.
abstract  void matchFound(EventBean theEvent, java.util.Collection<FilterHandleCallback> allStmtMatches)
          Indicate that an event was evaluated by the FilterService which matches the filter specification FilterSpecCompiled associated with this callback.
 void registerAdapter(EPServiceProvider epService)
          Register an adapter.
 void registerAdapter(OutputAdapter adapter)
          Sets the output adapter this subscription is associated with.
 void seteventTypeName(java.lang.String eventTypeName)
          Set the event type name we are looking for.
 void setSubscriptionName(java.lang.String subscriptionName)
          Sets the subscription name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.filter.FilterHandleCallback
isSubSelect
 
Methods inherited from interface com.espertech.esper.filter.FilterHandle
getStatementId
 

Field Detail

adapter

protected OutputAdapter adapter
The output adapter to which the subscription applies.


eventTypeName

protected java.lang.String eventTypeName
The event type of the events we are subscribing for.


subscriptionName

protected java.lang.String subscriptionName
The name of the subscription.

Constructor Detail

BaseSubscription

public BaseSubscription()
Ctor, assigns default name.

Method Detail

matchFound

public abstract void matchFound(EventBean theEvent,
                                java.util.Collection<FilterHandleCallback> allStmtMatches)
Description copied from interface: FilterHandleCallback
Indicate that an event was evaluated by the FilterService which matches the filter specification FilterSpecCompiled associated with this callback.

Specified by:
matchFound in interface FilterHandleCallback
Parameters:
theEvent - - the event received that matches the filter specification

setSubscriptionName

public void setSubscriptionName(java.lang.String subscriptionName)
Description copied from interface: Subscription
Sets the subscription name.

Specified by:
setSubscriptionName in interface Subscription
Parameters:
subscriptionName - is the subscription name

getSubscriptionName

public java.lang.String getSubscriptionName()
Description copied from interface: Subscription
Returns the subscription name.

Specified by:
getSubscriptionName in interface Subscription
Returns:
subscription name

getEventTypeName

public java.lang.String getEventTypeName()
Description copied from interface: Subscription
Returns the type name of the event type we are looking for.

Specified by:
getEventTypeName in interface Subscription
Returns:
event type name

seteventTypeName

public void seteventTypeName(java.lang.String eventTypeName)
Set the event type name we are looking for.

Parameters:
eventTypeName - is a type name

getAdapter

public OutputAdapter getAdapter()
Description copied from interface: Subscription
Returns the output adapter this subscription is associated with.

Specified by:
getAdapter in interface Subscription
Returns:
output adapter

registerAdapter

public void registerAdapter(OutputAdapter adapter)
Description copied from interface: Subscription
Sets the output adapter this subscription is associated with.

Specified by:
registerAdapter in interface Subscription
Parameters:
adapter - to set

registerAdapter

public void registerAdapter(EPServiceProvider epService)
Register an adapter.

Parameters:
epService - engine

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