Package org.osgi.service.clusterinfo
Interface FrameworkManager
-
- All Known Subinterfaces:
FrameworkNodeStatus
public interface FrameworkManagerProvides a management interface for accessing and managing a remote OSGi framework. This interface can be accessed remotely via Remote Services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.osgi.framework.dto.BundleDTOgetBundle(long id)Retrieve the bundle representation for a given bundle Id.java.util.Map<java.lang.String,java.lang.String>getBundleHeaders(long id)Get the header for a bundle given by its bundle Id.java.util.Collection<org.osgi.framework.dto.BundleDTO>getBundles()Get the bundle representations for all bundles currently installed in the managed framework.org.osgi.framework.startlevel.dto.BundleStartLevelDTOgetBundleStartLevel(long id)Get the start level for a bundle given by its bundle Id.intgetBundleState(long id)Get the state for a given bundle Id.org.osgi.framework.startlevel.dto.FrameworkStartLevelDTOgetFrameworkStartLevel()Retrieves the current framework start level.org.osgi.framework.dto.ServiceReferenceDTOgetServiceReference(long id)Get the service representation for a service given by its service Id.java.util.Collection<org.osgi.framework.dto.ServiceReferenceDTO>getServiceReferences()Get the service representations for all services.java.util.Collection<org.osgi.framework.dto.ServiceReferenceDTO>getServiceReferences(java.lang.String filter)Get the service representations for all services.org.osgi.framework.dto.BundleDTOinstallBundle(java.lang.String location)Install a new bundle given by an externally reachable location string, typically describing a URL.voidsetBundleStartLevel(long id, int startLevel)Set the start level for a bundle given by its bundle Id.voidsetFrameworkStartLevel(org.osgi.framework.startlevel.dto.FrameworkStartLevelDTO startLevel)Sets the current framework start level.voidstartBundle(long id)Start a bundle given by its bundle Id.voidstartBundle(long id, int options)Start a bundle given by its bundle Id.voidstopBundle(long id)Stop a bundle given by its bundle Id.voidstopBundle(long id, int options)Stop a bundle given by its bundle Id.org.osgi.framework.dto.BundleDTOuninstallBundle(long id)Uninstall a bundle given by its bundle Id.org.osgi.framework.dto.BundleDTOupdateBundle(long id)Updates a bundle given by its bundle Id using the bundle-internal update location.org.osgi.framework.dto.BundleDTOupdateBundle(long id, java.lang.String url)Updates a bundle given by its URI path using the content at the specified URL.
-
-
-
Method Detail
-
getBundle
org.osgi.framework.dto.BundleDTO getBundle(long id) throws java.lang.ExceptionRetrieve the bundle representation for a given bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Returns:
- A
BundleDTOfor the requested bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getBundleHeaders
java.util.Map<java.lang.String,java.lang.String> getBundleHeaders(long id) throws java.lang.ExceptionGet the header for a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Returns:
- Returns the map of headers entries.
- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getBundles
java.util.Collection<org.osgi.framework.dto.BundleDTO> getBundles() throws java.lang.ExceptionGet the bundle representations for all bundles currently installed in the managed framework.- Returns:
- Returns a collection of BundleDTO objects.
- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getBundleStartLevel
org.osgi.framework.startlevel.dto.BundleStartLevelDTO getBundleStartLevel(long id) throws java.lang.ExceptionGet the start level for a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Returns:
- Returns a
BundleStartLevelDTOdescribing the current start level of the bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getBundleState
int getBundleState(long id) throws java.lang.ExceptionGet the state for a given bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Returns:
- Returns the current bundle state as defined in
Bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getFrameworkStartLevel
org.osgi.framework.startlevel.dto.FrameworkStartLevelDTO getFrameworkStartLevel() throws java.lang.ExceptionRetrieves the current framework start level.- Returns:
- Returns the current framework start level in the form of a
FrameworkStartLevelDTO. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getServiceReference
org.osgi.framework.dto.ServiceReferenceDTO getServiceReference(long id) throws java.lang.ExceptionGet the service representation for a service given by its service Id.- Parameters:
id- Addresses the service by its identifier.- Returns:
- The service representation as
ServiceReferenceDTO. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getServiceReferences
java.util.Collection<org.osgi.framework.dto.ServiceReferenceDTO> getServiceReferences() throws java.lang.ExceptionGet the service representations for all services.- Returns:
- Returns the service representations in the form of
ServiceReferenceDTOobjects. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
getServiceReferences
java.util.Collection<org.osgi.framework.dto.ServiceReferenceDTO> getServiceReferences(java.lang.String filter) throws java.lang.ExceptionGet the service representations for all services.- Parameters:
filter- Passes a filter to restrict the result set.- Returns:
- Returns the service representations in the form of
ServiceReferenceDTOobjects. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
installBundle
org.osgi.framework.dto.BundleDTO installBundle(java.lang.String location) throws java.lang.ExceptionInstall a new bundle given by an externally reachable location string, typically describing a URL.- Parameters:
location- Passes the location string to retrieve the bundle content from.- Returns:
- Returns the
BundleDTOof the newly installed bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
setBundleStartLevel
void setBundleStartLevel(long id, int startLevel) throws java.lang.ExceptionSet the start level for a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.startLevel- The target start level.- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
setFrameworkStartLevel
void setFrameworkStartLevel(org.osgi.framework.startlevel.dto.FrameworkStartLevelDTO startLevel) throws java.lang.ExceptionSets the current framework start level.- Parameters:
startLevel- set the framework start level to this target.- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
startBundle
void startBundle(long id) throws java.lang.ExceptionStart a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
startBundle
void startBundle(long id, int options) throws java.lang.ExceptionStart a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.options- Passes additional options as defined inBundle.start(int)- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
stopBundle
void stopBundle(long id) throws java.lang.ExceptionStop a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
stopBundle
void stopBundle(long id, int options) throws java.lang.ExceptionStop a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.options- Passes additional options as defined inBundle.stop(int)- Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
uninstallBundle
org.osgi.framework.dto.BundleDTO uninstallBundle(long id) throws java.lang.ExceptionUninstall a bundle given by its bundle Id.- Parameters:
id- Addresses the bundle by its identifier.- Returns:
- Returns the
BundleDTOof the uninstalled bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
updateBundle
org.osgi.framework.dto.BundleDTO updateBundle(long id) throws java.lang.ExceptionUpdates a bundle given by its bundle Id using the bundle-internal update location.- Parameters:
id- Addresses the bundle by its identifier.- Returns:
- Returns the
BundleDTOof the updated bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
updateBundle
org.osgi.framework.dto.BundleDTO updateBundle(long id, java.lang.String url) throws java.lang.ExceptionUpdates a bundle given by its URI path using the content at the specified URL.- Parameters:
id- Addresses the bundle by its identifier.url- The URL whose content is to be used to update the bundle.- Returns:
- Returns the
BundleDTOof the updated bundle. - Throws:
java.lang.Exception- An exception representing a failure in the underlying remote call.
-
-