org.apache.ace.deployment
Interface Deployment


public interface Deployment

Service that abstracts the actual implementation that manages components that are to be deployed. Implementations of this interface could for example make use of the DeploymentAdmin from the OSGi spec to actually deploy packages. The objects used as arguments and return values must all be of the same type, which type depends on the implementation.


Method Summary
 String getName(Object object)
          Gets the name of the specified update package.
 org.osgi.framework.Version getVersion(Object object)
          Gets the version of the specified update package.
 Object install(InputStream inputStream)
          Deploys the contents of the stream onto the system.
 Object[] list()
          Retrieve a list of installed update packages.
 

Method Detail

install

Object install(InputStream inputStream)
               throws Exception
Deploys the contents of the stream onto the system.

Parameters:
inputStream - Stream containing new components.
Returns:
The update package that was installed, may be null if the implementation does not support this.
Throws:
Exception - If the specified stream could not be deployed.

getName

String getName(Object object)
               throws IllegalArgumentException
Gets the name of the specified update package. Guaranteed to work with Objects returned by the same implementation of this interface.

Parameters:
object - The update package
Returns:
the name
Throws:
IllegalArgumentException - when the specified object is an invalid update package, only Objects returned by the same implementation of this interface should be used.

getVersion

org.osgi.framework.Version getVersion(Object object)
                                      throws IllegalArgumentException
Gets the version of the specified update package. Guaranteed to work with Objects returned by the same implementation of this interface.

Parameters:
object - The update package
Returns:
the version
Throws:
IllegalArgumentException - when the specified object is an invalid update package, only Objects returned by the same implementation of this interface should be used.

list

Object[] list()
Retrieve a list of installed update packages.

Returns:
list of installed update packages or an empty array if none are available.


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