org.apache.aries.application.management
Interface AriesApplicationManager


public interface AriesApplicationManager

An AriesApplicationManager service is used to create, install and uninstall Aries applications.


Method Summary
 void addApplicationListener(AriesApplicationListener l)
          Add an AriesApplicationListener
 AriesApplication createApplication(IDirectory source)
          Create an AriesApplication from a local resource.
 AriesApplication createApplication(URL url)
          Create an AriesApplication from a remote resource.
 AriesApplicationContext install(AriesApplication app)
          Install an AriesApplication - i.e.
 void removeApplicationListener(AriesApplicationListener l)
          Remove an AriesApplicationListener
 AriesApplication resolve(AriesApplication originalApp, ResolveConstraint... constraints)
          Resolve an AriesApplication against a set of constraints.
 void uninstall(AriesApplicationContext app)
          Uninstall an AriesApplication - i.e.
 AriesApplicationContext update(AriesApplication app, DeploymentMetadata depMf)
          Update an application's deployment and apply the changes to the runtime if the application is deployed
 

Method Detail

createApplication

AriesApplication createApplication(IDirectory source)
                                   throws ManagementException
Create an AriesApplication from a local resource. The application won't be automatically resolved if the archive does not contain a deployment manifest.

Parameters:
source - .eba file, or exploded directory
Returns:
AriesApplication
Throws:
ManagementException

createApplication

AriesApplication createApplication(URL url)
                                   throws ManagementException
Create an AriesApplication from a remote resource. The application won't be automatically resolved if the archive does not contain a deployment manifest.

Parameters:
url -
Returns:
the application.
Throws:
ManagementException

install

AriesApplicationContext install(AriesApplication app)
                                throws BundleException,
                                       ManagementException,
                                       ResolverException
Install an AriesApplication - i.e. load its bundles into the runtime, but do not start them. If the application is not resolved, a call to resolve(AriesApplication, ResolveConstraint...) will be performed and the resolved application will be installed. In such a case the resolved application can be obtained by calling AriesApplicationContext.getApplication() on the returned ApplicationContext.

Parameters:
app - Application to install
Returns:
AriesApplicationContext, a handle to an application in the runtime
Throws:
BundleException
ManagementException
ResolverException

uninstall

void uninstall(AriesApplicationContext app)
               throws BundleException
Uninstall an AriesApplication - i.e. unload its bundles from the runtime.

Parameters:
app - The installed application to uninstall
Throws:
BundleException

addApplicationListener

void addApplicationListener(AriesApplicationListener l)
Add an AriesApplicationListener

Parameters:
l -

removeApplicationListener

void removeApplicationListener(AriesApplicationListener l)
Remove an AriesApplicationListener

Parameters:
l -

update

AriesApplicationContext update(AriesApplication app,
                               DeploymentMetadata depMf)
                               throws UpdateException
Update an application's deployment and apply the changes to the runtime if the application is deployed

Parameters:
app - The application to change
depMf - The new deployment metadata
Returns:
AriesApplicationContext Returns a new application context if the app is currently deployed, or null if the app is not currently installed
Throws:
UpdateException - if the deployment changes could not be effected in the runtime
IllegalArgumentException - if the deployment metadata does not correspond to the same application (same symbolic name and same version)

resolve

AriesApplication resolve(AriesApplication originalApp,
                         ResolveConstraint... constraints)
                         throws ResolverException
Resolve an AriesApplication against a set of constraints. Each ResolveConstraint represents a single proposed change to the content of an application. If no constraints are given, a default resolution will be performed.

Parameters:
originalApp - Original application
constraints - Constraints
Returns:
New AriesApplication
Throws:
ResolverException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.