|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface is the main interface for an Openwings Installer.
Through this interface components may be added, removed, and queried. Information about component is queried through configuration files, called policies.
It is expected that one installation service will run per platform. To achieve a cluster or context based installation the programmatic access to the service can be used.
| Method Summary | |
void |
addInstallListener(InstallListener installListener)
This method is used to add an installation listener. |
void |
addVoter(Voter voter)
This method is used to add a voter to vote on removal of components. |
InstallableComponentDescriptor[] |
getComponents()
This method returns an array of ComponentDescriptor
for all components installed on the system. |
InstallableComponentDescriptor |
installComponent(java.net.URL component,
boolean overwrite)
This method is used to add a Component to a platform. |
InstallableComponentDescriptor |
installComponent(java.net.URL component,
boolean overwrite,
boolean runImmediately,
boolean serve)
This method is used to add a Component to a platform. |
void |
removeInstallListener(InstallListener installListener)
This method is used to remove an installation listener. |
void |
removeVoter(Voter voter)
This method is used to remove a voter. |
boolean |
uninstallComponent(InstallableComponentDescriptor installableComponentDescriptor,
boolean force)
This method is used to remove a Component from a platform. |
| Method Detail |
public InstallableComponentDescriptor installComponent(java.net.URL component,
boolean overwrite)
throws InstallException,
java.rmi.RemoteException
A URL is passed in that points to the installation jar file for the component. If the component is successfully installed, a component identifier will be returned assuming the component is on the local platform. Note that a component identifier from different installers for the same URL may not be equal.
This method is expected to authenticate, install, and resolve dependencies and policies for the component. The component will at least be authenticated and installed after this call successfully completes. The component may not be resolved. This means that its policies may not have been finalized or components that it depends on to run may have not been found. Components should not be run until they have been resolved.
component - url is used to identify the component jar file to be
installed.overwrite - indicates whether the component should be installed
if an identical component already has been installed.
InstallableComponentDescriptor if the
component is successfully installed.
InstallException - is returned if the component cannot be
installed for some reason. This can be for security reasons or
space reasons.
java.rmi.RemoteException - for communication errors
public InstallableComponentDescriptor installComponent(java.net.URL component,
boolean overwrite,
boolean runImmediately,
boolean serve)
throws InstallException,
java.rmi.RemoteException
runImmediatelyHint and serveHint
fields of the InstallableComponentDescriptor contained
in the component image.
A URL is passed in that points to the installation jar file for the component. If the component is successfully installed, a component identifier will be returned assuming the component is on the local platform. Note that a component identifier from different installers for the same URL may not be equal.
This method is expected to authenticate, install, and resolve dependencies and policies for the component. The component will at least be authenticated and installed after this call successfully completes. The component may not be resolved. This means that its policies may not have been finalized or components that it depends on to run may have not been found. Components should not be run until they have been resolved.
component - url is used to identify the component jar file to be
installed.overwrite - indicates whether the component should be installed
if an identical component already has been installed.runImmediately - allows the user to explicitly request whether the
component should be run immediately upon install, instead of relying
upon the runImmediatelyHint in the
InstallableComponentDescriptor in the component image.serve - allows the user to explicitly request whether the
component should be served for potential installation to other
platforms, instead of relying upon the serveHint in the
InstallableComponentDescriptor in the component image.
InstallableComponentDescriptor if the
component is successfully installed.
InstallException - is returned if the component cannot be
installed for some reason. This can be for security reasons or
space reasons.
java.rmi.RemoteException - for communication errors
public boolean uninstallComponent(InstallableComponentDescriptor installableComponentDescriptor,
boolean force)
throws InstallException,
java.rmi.RemoteException
If the component is currently not installed the routine will return without an exception. If the component is unable to be removed (due to running instances of the component or other running components that depend on it), it will be marked for removal. The force option will attempt to remove the component even if running instances or dependencies exist. The force option should be used sparingly as it can cause reduction in system availability.
force - component removal
true if the component existed
(provided for debugging purposes only).
java.rmi.RemoteException - for communication errors
InstallException - is returned if the component cannot be
uninstalled for some reason. This can be for security reasons.
public InstallableComponentDescriptor[] getComponents()
throws java.rmi.RemoteException
ComponentDescriptor
for all components installed on the system.
InstallableComponentDescriptors.
java.rmi.RemoteException - for communication errors
public void addInstallListener(InstallListener installListener)
throws java.rmi.RemoteException
installListener - is the callback for installation events. If this
Interface is being invoked remotely, it is expected to be distributed (i.e.
remote).
java.rmi.RemoteException - for communication errors
public void removeInstallListener(InstallListener installListener)
throws java.rmi.RemoteException
installListener - the callback for installation events
java.rmi.RemoteException - for communication errors
public void addVoter(Voter voter)
throws java.rmi.RemoteException
voter - the callback for voting events.
java.rmi.RemoteException - for communication errors
public void removeVoter(Voter voter)
throws java.rmi.RemoteException
voter identifies the voter that will be removed.
voter - callback object previously passed to addVoter
java.rmi.RemoteException - for communication errors
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||