com.espertech.esper.client.deploy
Interface EPDeploymentAdmin

All Known Subinterfaces:
EPDeploymentAdminSPI
All Known Implementing Classes:
EPDeploymentAdminImpl

public interface EPDeploymentAdmin

Service to package and deploy EPL statements organized into an EPL module.


Method Summary
 java.lang.String add(Module module)
          Adds a module in undeployed state, generating a deployment id and returning the generated deployment id of the module.
 void add(Module module, java.lang.String assignedDeploymentId)
          Adds a module in undeployed state, using the provided deployment id as a unique identifier for the module.
 DeploymentResult deploy(Module module, DeploymentOptions options)
          Deploy a single module returning a generated deployment id to use when undeploying statements as well as additional statement-level information.
 DeploymentResult deploy(Module module, DeploymentOptions options, java.lang.String assignedDeploymentId)
          Deploy a single module using the deployment id provided as a parameter.
 DeploymentResult deploy(java.lang.String deploymentId, DeploymentOptions options)
          Deploy a previously undeployed module.
 DeploymentInformation getDeployment(java.lang.String deploymentId)
          Returns the deployment information for a given deployment.
 DeploymentInformation[] getDeploymentInformation()
          Returns deployment information for all known modules.
 DeploymentOrder getDeploymentOrder(java.util.Collection<Module> modules, DeploymentOrderOptions options)
          Compute a deployment order among the modules passed in considering their uses-dependency declarations and considering the already-deployed modules.
 java.lang.String[] getDeployments()
          Return deployment ids of all currently known modules.
 boolean isDeployed(java.lang.String moduleName)
          Determine if a named module is already deployed (in deployed state), returns true if one or more modules of the same name are deployed or false when no module of that name is deployed.
 Module parse(java.lang.String eplModuleText)
          Parse the module text passed in, returning the module.
 DeploymentResult parseDeploy(java.lang.String eplModuleText)
          Shortcut method to parse and deploy a single module from a string text buffer, without providing a module URI name or archive name or user object.
 DeploymentResult parseDeploy(java.lang.String eplModuleText, java.lang.String moduleURI, java.lang.String moduleArchive, java.lang.Object userObject)
          Shortcut method to parse and deploy a single module from a string text buffer.
 Module read(java.io.File file)
          Read the module by reading the text file and return the module.
 Module read(java.io.InputStream stream, java.lang.String moduleUri)
          Read the input stream and return the module.
 Module read(java.lang.String resource)
          Read the resource by opening from classpath and return the module.
 Module read(java.net.URL url)
          Read the module by reading from the URL provided and return the module.
 DeploymentResult readDeploy(java.io.InputStream stream, java.lang.String moduleURI, java.lang.String moduleArchive, java.lang.Object userObject)
          Shortcut method to read and deploy a single module from an input stream.
 DeploymentResult readDeploy(java.lang.String resource, java.lang.String moduleURI, java.lang.String moduleArchive, java.lang.Object userObject)
          Shortcut method to read and deploy a single module from a classpath resource.
 void remove(java.lang.String deploymentId)
          Remove a module that is currently in undeployed state.
 UndeploymentResult undeploy(java.lang.String deploymentId)
          Undeploy a previously deployed module.
 UndeploymentResult undeploy(java.lang.String deploymentId, UndeploymentOptions undeploymentOptions)
          Undeploy a previously deployed module.
 UndeploymentResult undeployRemove(java.lang.String deploymentId)
          Undeploy a single module, if its in deployed state, and removes it from the known modules.
 UndeploymentResult undeployRemove(java.lang.String deploymentId, UndeploymentOptions undeploymentOptions)
          Undeploy a single module, if its in deployed state, and removes it from the known modules.
 

Method Detail

read

Module read(java.io.InputStream stream,
            java.lang.String moduleUri)
            throws java.io.IOException,
                   ParseException
Read the input stream and return the module. It is up to the calling method to close the stream when done.

Parameters:
stream - to read
moduleUri - uri of the module
Returns:
module
Throws:
java.io.IOException - when the io operation failed
ParseException - when parsing of the module failed

read

Module read(java.lang.String resource)
            throws java.io.IOException,
                   ParseException
Read the resource by opening from classpath and return the module.

Parameters:
resource - name of the classpath resource
Returns:
module
Throws:
java.io.IOException - when the resource could not be read
ParseException - when parsing of the module failed

read

Module read(java.io.File file)
            throws java.io.IOException,
                   ParseException
Read the module by reading the text file and return the module.

Parameters:
file - the file to read
Returns:
module
Throws:
java.io.IOException - when the file could not be read
ParseException - when parsing of the module failed

read

Module read(java.net.URL url)
            throws java.io.IOException,
                   ParseException
Read the module by reading from the URL provided and return the module.

Parameters:
url - the URL to read
Returns:
module
Throws:
java.io.IOException - when the url input stream could not be read
ParseException - when parsing of the module failed

parse

Module parse(java.lang.String eplModuleText)
             throws java.io.IOException,
                    ParseException
Parse the module text passed in, returning the module.

Parameters:
eplModuleText - to parse
Returns:
module
Throws:
java.io.IOException - when the parser failed to read the string buffer
ParseException - when parsing of the module failed

getDeploymentOrder

DeploymentOrder getDeploymentOrder(java.util.Collection<Module> modules,
                                   DeploymentOrderOptions options)
                                   throws DeploymentException
Compute a deployment order among the modules passed in considering their uses-dependency declarations and considering the already-deployed modules.

The operation also checks and reports circular dependencies.

Pass in @{link DeploymentOrderOptions} to customize the behavior if this method. When passing no options or passing default options, the default behavior checks uses-dependencies and circular dependencies.

Parameters:
modules - to determine ordering for
options - operation options or null for default options
Returns:
ordered modules
Throws:
DeploymentOrderException - when any module dependencies are not satisfied
DeploymentException

deploy

DeploymentResult deploy(Module module,
                        DeploymentOptions options)
                        throws DeploymentException
Deploy a single module returning a generated deployment id to use when undeploying statements as well as additional statement-level information.

Pass in @{link DeploymentOptions} to customize the behavior. When passing no options or passing default options, the operation first compiles all EPL statements before starting each statement, fails-fast on the first statement that fails to start and rolls back (destroys) any started statement on a failure.

When setting validate-only in the deployment options, the method returns a null-value on success.

Parameters:
module - to deploy
options - operation options or null for default options
Returns:
result object with statement detail, or null for pass on validate-only
Throws:
DeploymentActionException - when the deployment fails, contains a list of deployment failures
DeploymentException

deploy

DeploymentResult deploy(Module module,
                        DeploymentOptions options,
                        java.lang.String assignedDeploymentId)
                        throws DeploymentActionException
Deploy a single module using the deployment id provided as a parameter.

Pass in @{link DeploymentOptions} to customize the behavior. When passing no options or passing default options, the operation first compiles all EPL statements before starting each statement, fails-fast on the first statement that fails to start and rolls back (destroys) any started statement on a failure.

When setting validate-only in the deployment options, the method returns a null-value on success.

Parameters:
module - to deploy
options - operation options or null for default options
assignedDeploymentId - the deployment id to assign
Returns:
result object with statement detail, or null for pass on validate-only
Throws:
DeploymentActionException - when the deployment fails, contains a list of deployment failures

undeployRemove

UndeploymentResult undeployRemove(java.lang.String deploymentId)
                                  throws DeploymentNotFoundException
Undeploy a single module, if its in deployed state, and removes it from the known modules.

This operation destroys all statements previously associated to the deployed module and also removes this module from the list deployments list.

Parameters:
deploymentId - of the deployment to undeploy.
Returns:
result object with statement-level detail
Throws:
DeploymentNotFoundException - when the deployment id could not be resolved to a deployment

undeployRemove

UndeploymentResult undeployRemove(java.lang.String deploymentId,
                                  UndeploymentOptions undeploymentOptions)
                                  throws DeploymentNotFoundException
Undeploy a single module, if its in deployed state, and removes it from the known modules.

This operation, by default, destroys all statements previously associated to the deployed module and also removes this module from the list deployments list. Use the options object to control whether statements get destroyed.

Parameters:
deploymentId - of the deployment to undeploy.
undeploymentOptions - for controlling undeployment, can be a null value
Returns:
result object with statement-level detail
Throws:
DeploymentNotFoundException - when the deployment id could not be resolved to a deployment

getDeployments

java.lang.String[] getDeployments()
Return deployment ids of all currently known modules.

Returns:
array of deployment ids

getDeployment

DeploymentInformation getDeployment(java.lang.String deploymentId)
Returns the deployment information for a given deployment.

Parameters:
deploymentId - to return the deployment information for.
Returns:
deployment info

getDeploymentInformation

DeploymentInformation[] getDeploymentInformation()
Returns deployment information for all known modules.

Returns:
deployment information.

isDeployed

boolean isDeployed(java.lang.String moduleName)
Determine if a named module is already deployed (in deployed state), returns true if one or more modules of the same name are deployed or false when no module of that name is deployed.

Parameters:
moduleName - to look up
Returns:
indicator

readDeploy

DeploymentResult readDeploy(java.lang.String resource,
                            java.lang.String moduleURI,
                            java.lang.String moduleArchive,
                            java.lang.Object userObject)
                            throws java.io.IOException,
                                   ParseException,
                                   DeploymentException
Shortcut method to read and deploy a single module from a classpath resource.

Uses default options for performing deployment dependency checking and deployment.

Parameters:
resource - to read
moduleURI - uri of module to assign or null if not applicable
moduleArchive - archive name of module to assign or null if not applicable
userObject - user object to assign to module, passed along unused as part of deployment information, or null if not applicable
Returns:
deployment result object
Throws:
java.io.IOException - when the file could not be read
ParseException - when parsing of the module failed
DeploymentOrderException - when any module dependencies are not satisfied
DeploymentActionException - when the deployment fails, contains a list of deployment failures
DeploymentException

readDeploy

DeploymentResult readDeploy(java.io.InputStream stream,
                            java.lang.String moduleURI,
                            java.lang.String moduleArchive,
                            java.lang.Object userObject)
                            throws java.io.IOException,
                                   ParseException,
                                   DeploymentException
Shortcut method to read and deploy a single module from an input stream.

Uses default options for performing deployment dependency checking and deployment.

Leaves the stream unclosed.

Parameters:
stream - to read
moduleURI - uri of module to assign or null if not applicable
moduleArchive - archive name of module to assign or null if not applicable
userObject - user object to assign to module, passed along unused as part of deployment information, or null if not applicable
Returns:
deployment result object
Throws:
java.io.IOException - when the file could not be read
ParseException - when parsing of the module failed
DeploymentOrderException - when any module dependencies are not satisfied
DeploymentActionException - when the deployment fails, contains a list of deployment failures
DeploymentException

parseDeploy

DeploymentResult parseDeploy(java.lang.String eplModuleText,
                             java.lang.String moduleURI,
                             java.lang.String moduleArchive,
                             java.lang.Object userObject)
                             throws java.io.IOException,
                                    ParseException,
                                    DeploymentException
Shortcut method to parse and deploy a single module from a string text buffer.

Uses default options for performing deployment dependency checking and deployment.

Parameters:
eplModuleText - to parse
moduleURI - uri of module to assign or null if not applicable
moduleArchive - archive name of module to assign or null if not applicable
userObject - user object to assign to module, passed along unused as part of deployment information, or null if not applicable
Returns:
deployment result object
Throws:
java.io.IOException - when the file could not be read
ParseException - when parsing of the module failed
DeploymentOrderException - when any module dependencies are not satisfied
DeploymentActionException - when the deployment fails, contains a list of deployment failures
DeploymentException

parseDeploy

DeploymentResult parseDeploy(java.lang.String eplModuleText)
                             throws java.io.IOException,
                                    ParseException,
                                    DeploymentException
Shortcut method to parse and deploy a single module from a string text buffer, without providing a module URI name or archive name or user object. The module URI, archive name and user object are defaulted to null.

Uses default options for performing deployment dependency checking and deployment.

Parameters:
eplModuleText - to parse
Returns:
deployment result object
Throws:
java.io.IOException - when the file could not be read
ParseException - when parsing of the module failed
DeploymentOrderException - when any module dependencies are not satisfied
DeploymentActionException - when the deployment fails, contains a list of deployment failures
DeploymentException

add

java.lang.String add(Module module)
Adds a module in undeployed state, generating a deployment id and returning the generated deployment id of the module.

Parameters:
module - to add
Returns:
The deployment id assigned to the module

add

void add(Module module,
         java.lang.String assignedDeploymentId)
Adds a module in undeployed state, using the provided deployment id as a unique identifier for the module.

Parameters:
module - to add
assignedDeploymentId - deployment id to assign

remove

void remove(java.lang.String deploymentId)
            throws DeploymentException
Remove a module that is currently in undeployed state.

This call may only be used on undeployed modules.

Parameters:
deploymentId - of the module to remove
Throws:
DeploymentStateException - when attempting to remove a module that does not exist or a module that is not in undeployed state
DeploymentNotFoundException - if no such deployment id is known
DeploymentException

deploy

DeploymentResult deploy(java.lang.String deploymentId,
                        DeploymentOptions options)
                        throws DeploymentException
Deploy a previously undeployed module.

Parameters:
deploymentId - of the module to deploy
options - deployment options
Returns:
deployment result
Throws:
DeploymentStateException - when attempting to deploy a module that does not exist is already deployed
DeploymentOrderException - when deployment dependencies are not satisfied
DeploymentActionException - when the deployment (or validation when setting validate-only) failed
DeploymentNotFoundException - if no such deployment id is known
DeploymentException

undeploy

UndeploymentResult undeploy(java.lang.String deploymentId)
                            throws DeploymentException
Undeploy a previously deployed module.

Parameters:
deploymentId - of the module to undeploy
Returns:
undeployment result
Throws:
DeploymentStateException - when attempting to undeploy a module that does not exist is already undeployed
DeploymentNotFoundException - when the deployment id could not be resolved
DeploymentException

undeploy

UndeploymentResult undeploy(java.lang.String deploymentId,
                            UndeploymentOptions undeploymentOptions)
                            throws DeploymentException
Undeploy a previously deployed module.

Parameters:
deploymentId - of the module to undeploy
undeploymentOptions - undeployment options, or null for default behavior
Returns:
undeployment result
Throws:
DeploymentStateException - when attempting to undeploy a module that does not exist is already undeployed
DeploymentNotFoundException - when the deployment id could not be resolved
DeploymentException

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