Interface EPStatement
- All Superinterfaces:
EPIterable
,EPListenable
-
Method Summary
Modifier and TypeMethodDescriptionReturns statement annotations.Returns the deployment id.Returns the type of events the statement pushes to listeners or returns for iterator.getName()
Returns the statement name.getProperty
(StatementProperty field) Returns a statement property value.Returns the current subscriber instance that receives statement results.Returns the application defined user data object associated with the statement at compile time, or null if none was supplied at time of statement compilation.Returns the application defined user data object associated with the statement at deployment time, or null if none was supplied at time of deployment.boolean
Returns true if the statement has been undeployed.void
setSubscriber
(Object subscriber) Attaches a subscriber to receive statement results, or removes a previously set subscriber (by providing a null value).void
setSubscriber
(Object subscriber, String methodName) Attaches a subscriber to receive statement results by calling the method with the provided method name, or removes a previously set subscriber (by providing a null value).Methods inherited from interface com.espertech.esper.runtime.client.EPIterable
iterator, iterator, safeIterator, safeIterator
Methods inherited from interface com.espertech.esper.runtime.client.EPListenable
addListener, addListenerWithReplay, getUpdateListeners, removeAllListeners, removeListener
-
Method Details
-
getEventType
EventType getEventType()Returns the type of events the statement pushes to listeners or returns for iterator.For create-schema returns the created event type.
- Returns:
- event type of events the iterator returns and that listeners receive
-
getAnnotations
Annotation[] getAnnotations()Returns statement annotations.See the annotation
com.espertech.esper.common.client.annotation
package for available annotations. Application can define their own annotations.- Returns:
- annotations or a zero-length array if no annotaions have been specified.
-
getName
String getName()Returns the statement name.- Returns:
- statement name
-
getDeploymentId
String getDeploymentId()Returns the deployment id.- Returns:
- deployment id
-
getProperty
Returns a statement property value.- Parameters:
field
- statement property value- Returns:
- property or null if not set
-
isDestroyed
boolean isDestroyed()Returns true if the statement has been undeployed.- Returns:
- true for undeployed statements, false for deployed statements.
-
setSubscriber
Attaches a subscriber to receive statement results, or removes a previously set subscriber (by providing a null value).Note: Requires the allow-subscriber compiler options.
Only a single subscriber may be set for a statement. If this method is invoked twice any previously-set subscriber is no longer used.- Parameters:
subscriber
- to attach, or null to remove the previously set subscriber- Throws:
EPSubscriberException
- if the subscriber does not provide the methods needed to receive statement results
-
setSubscriber
Attaches a subscriber to receive statement results by calling the method with the provided method name, or removes a previously set subscriber (by providing a null value).Note: Requires the allow-subscriber compiler options.
Only a single subscriber may be set for a statement. If this method is invoked twice any previously-set subscriber is no longer used.- Parameters:
subscriber
- to attach, or null to remove the previously set subscribermethodName
- the name of the method to invoke, or null for the "update" method- Throws:
EPSubscriberException
- if the subscriber does not provide the methods needed to receive statement results
-
getSubscriber
Object getSubscriber()Returns the current subscriber instance that receives statement results.- Returns:
- subscriber object, or null to indicate that no subscriber is attached
-
getUserObjectCompileTime
Object getUserObjectCompileTime()Returns the application defined user data object associated with the statement at compile time, or null if none was supplied at time of statement compilation.The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
User objects are passed at time of statement compilation via options.
- Returns:
- user object or null if none defined
-
getUserObjectRuntime
Object getUserObjectRuntime()Returns the application defined user data object associated with the statement at deployment time, or null if none was supplied at time of deployment.The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
User objects are passed at time of deployment via options.
- Returns:
- user object or null if none defined
-