public interface EPServiceProvider
Modifier and Type | Method and Description |
---|---|
void |
addServiceStateListener(EPServiceStateListener listener)
Add a listener to service provider state changes that receives a before-destroy event.
|
void |
addStatementStateListener(EPStatementStateListener listener)
Add a listener to statement state changes that receives statement-level events.
|
void |
destroy()
Destroys the service.
|
Context |
getContext()
Provides naming context for public named objects.
|
ReadWriteLock |
getEngineInstanceWideLock()
Returns the engine-instance global read-write lock.
|
EPAdministrator |
getEPAdministrator()
Returns a class instance of EPAdministrator.
|
EPRuntime |
getEPRuntime()
Returns a class instance of EPRuntime.
|
EPServiceProviderIsolated |
getEPServiceIsolated(String name)
Returns the isolated service provider for that name,
creating an isolated service if the name is a new name, or
returning an existing isolated service for an existing name.
|
String[] |
getEPServiceIsolatedNames()
Returns the names of isolated service providers currently allocated.
|
String |
getURI()
Returns the provider URI, or "default" if this is the default provider.
|
void |
initialize()
Frees any resources associated with this engine instance, and leaves the engine instance
ready for further use.
|
boolean |
isDestroyed()
Returns true if the service is in destroyed state, or false if not.
|
void |
removeAllServiceStateListeners()
Remove all listeners to service provider state changes.
|
void |
removeAllStatementStateListeners()
Remove all listeners to statement state changes.
|
boolean |
removeServiceStateListener(EPServiceStateListener listener)
Removate a listener to service provider state changes.
|
boolean |
removeStatementStateListener(EPStatementStateListener listener)
Removate a listener to statement state changes.
|
EPRuntime getEPRuntime() throws EPServiceDestroyedException
If the engine instance is destroyed, the behavior is undefined and a NullPointerException is possible.
EPServiceDestroyedException
- thrown when the engine instance has been destroyedEPAdministrator getEPAdministrator() throws EPServiceDestroyedException
If the engine instance is destroyed, the behavior is undefined and a NullPointerException is possible.
EPServiceDestroyedException
- thrown when the engine instance has been destroyedContext getContext() throws EPServiceDestroyedException
An extension point designed for use by input and output adapters as well as other extension services.
EPServiceDestroyedException
- thrown when the engine instance has been destroyedvoid initialize()
Do not use the EPAdministrator
administrative and EPRuntime
runtime instances obtained before the
initialize (including related services such as configuration, module management, etc.).
Your application must obtain new administrative and runtime instances.
Retains the existing configuration of the engine instance but forgets any runtime configuration changes.
Stops and destroys any existing statement resources such as filters, patterns, expressions, views.
String getURI()
void destroy()
Releases any resources held by the service. The service enteres a state in which operations provided by administrative and runtime interfaces originiated by the service are not guaranteed to operate properly.
Removes the service URI from the known URIs. Allows configuration to change for the instance.
When destroying a service instance your application must make sure that threads that are sending events into the service have completed their work. More generally, the service should not be currently in use during or after the destroy operation.
boolean isDestroyed()
void addServiceStateListener(EPServiceStateListener listener)
listener
- to addboolean removeServiceStateListener(EPServiceStateListener listener)
listener
- to removevoid removeAllServiceStateListeners()
void addStatementStateListener(EPStatementStateListener listener)
listener
- to addboolean removeStatementStateListener(EPStatementStateListener listener)
listener
- to removevoid removeAllStatementStateListeners()
EPServiceProviderIsolated getEPServiceIsolated(String name) throws EPServiceDestroyedException, EPServiceNotAllowedException
Note: Requires configuration setting.
name
- to return isolated service forEPServiceDestroyedException
- thrown when the engine instance has been destroyedEPServiceNotAllowedException
- thrown when the engine configuration does not allow isolated service providersString[] getEPServiceIsolatedNames()
ReadWriteLock getEngineInstanceWideLock()
EPRuntime.sendEvent(java.lang.Object)
method takes a read lock.
The EPAdministrator.createEPL(java.lang.String)
methods take a write lock.