net.esper.core
Class EPServiceProviderImpl

java.lang.Object
  extended by net.esper.core.EPServiceProviderImpl
All Implemented Interfaces:
EPServiceProvider, EPServiceProviderSPI

public class EPServiceProviderImpl
extends Object
implements EPServiceProviderSPI

Service provider encapsulates the engine's services for runtime and administration interfaces.


Constructor Summary
EPServiceProviderImpl(Configuration configuration, String engineURI)
          Constructor - initializes services.
 
Method Summary
 void destroy()
          Destroys the service.
 Context getContext()
          Provides naming context for public named objects.
 EPAdministrator getEPAdministrator()
          Returns a class instance of EPAdministrator.
 EPRuntime getEPRuntime()
          Returns a class instance of EPRuntime.
 EventAdapterService getEventAdapterService()
          Get the EventAdapterService for this engine.
 ExtensionServicesContext getExtensionServicesContext()
          Returns the extension services context.
 FilterService getFilterService()
          Returns the filter service.
 SchedulingService getSchedulingService()
          Get the SchedulingService for this engine.
 String getURI()
          Returns the provider URI, or null if this is the default provider.
 void initialize()
          Frees any resources associated with this runtime 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 setConfiguration(Configuration configuration)
          Sets engine configuration information for use in the next initialize.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EPServiceProviderImpl

public EPServiceProviderImpl(Configuration configuration,
                             String engineURI)
                      throws ConfigurationException
Constructor - initializes services.

Parameters:
configuration - is the engine configuration
engineURI - is the engine URI or null if this is the default provider
Throws:
ConfigurationException - is thrown to indicate a configuraton error
Method Detail

setConfiguration

public void setConfiguration(Configuration configuration)
Sets engine configuration information for use in the next initialize.

Parameters:
configuration - is the engine configs

getURI

public String getURI()
Description copied from interface: EPServiceProvider
Returns the provider URI, or null if this is the default provider.

Specified by:
getURI in interface EPServiceProvider
Returns:
provider URI

getEPRuntime

public EPRuntime getEPRuntime()
Description copied from interface: EPServiceProvider
Returns a class instance of EPRuntime.

Specified by:
getEPRuntime in interface EPServiceProvider
Returns:
an instance of EPRuntime

getEPAdministrator

public EPAdministrator getEPAdministrator()
Description copied from interface: EPServiceProvider
Returns a class instance of EPAdministrator.

Specified by:
getEPAdministrator in interface EPServiceProvider
Returns:
an instance of EPAdministrator

getEventAdapterService

public EventAdapterService getEventAdapterService()
Description copied from interface: EPServiceProviderSPI
Get the EventAdapterService for this engine.

Specified by:
getEventAdapterService in interface EPServiceProviderSPI
Returns:
the EventAdapterService

getSchedulingService

public SchedulingService getSchedulingService()
Description copied from interface: EPServiceProviderSPI
Get the SchedulingService for this engine.

Specified by:
getSchedulingService in interface EPServiceProviderSPI
Returns:
the SchedulingService

getFilterService

public FilterService getFilterService()
Description copied from interface: EPServiceProviderSPI
Returns the filter service.

Specified by:
getFilterService in interface EPServiceProviderSPI
Returns:
filter service

getExtensionServicesContext

public ExtensionServicesContext getExtensionServicesContext()
Description copied from interface: EPServiceProviderSPI
Returns the extension services context.

Specified by:
getExtensionServicesContext in interface EPServiceProviderSPI
Returns:
extension services context

getContext

public Context getContext()
Description copied from interface: EPServiceProvider
Provides naming context for public named objects.

An extension point designed for use by input and output adapters as well as other extension services.

Specified by:
getContext in interface EPServiceProvider
Specified by:
getContext in interface EPServiceProviderSPI
Returns:
naming context providing name-to-object bindings

destroy

public void destroy()
Description copied from interface: EPServiceProviderSPI
Destroys the service.

Specified by:
destroy in interface EPServiceProviderSPI

isDestroyed

public boolean isDestroyed()
Description copied from interface: EPServiceProviderSPI
Returns true if the service is in destroyed state, or false if not.

Specified by:
isDestroyed in interface EPServiceProviderSPI
Returns:
indicator whether the service has been destroyed

initialize

public void initialize()
Description copied from interface: EPServiceProvider
Frees any resources associated with this runtime instance, and leaves the engine instance ready for further use.

Stops and destroys any existing statement resources such as filters, patterns, expressions, views.

Specified by:
initialize in interface EPServiceProvider