Top Description Methods
org.osgi.service.clusterinfo

public Interface FrameworkManager

Known Direct Subinterfaces
org.osgi.service.clusterinfo.FrameworkNodeStatus
Imports
java.util.Collection, .Map, org.osgi.framework.dto.BundleDTO, .ServiceReferenceDTO, org.osgi.framework.startlevel.dto.BundleStartLevelDTO, .FrameworkStartLevelDTO

Provides a management interface for accessing and managing a remote OSGi framework. This interface can be accessed remotely via Remote Services.

Method Summary

Modifier and TypeMethod and Description
public BundleDTO

Returns:

A BundleDTO for the requested bundle.
getBundle
(long
Addresses the bundle by its identifier.
id
)

Retrieve the bundle representation for a given bundle Id.

public Map<String, String>

Returns:

Returns the map of headers entries.
getBundleHeaders
(long
Addresses the bundle by its identifier.
id
)

Get the header for a bundle given by its bundle Id.

public Collection<BundleDTO>

Returns:

Returns a collection of BundleDTO objects.
getBundles
()

Get the bundle representations for all bundles currently installed in the managed framework.

public BundleStartLevelDTO

Returns:

Returns a BundleStartLevelDTO describing the current start level of the bundle.
getBundleStartLevel
(long
Addresses the bundle by its identifier.
id
)

Get the start level for a bundle given by its bundle Id.

public int

Returns:

Returns the current bundle state as defined in org.osgi.framework.Bundle.
getBundleState
(long
Addresses the bundle by its identifier.
id
)

Get the state for a given bundle Id.

public FrameworkStartLevelDTO

Returns:

Returns the current framework start level in the form of a FrameworkStartLevelDTO.
getFrameworkStartLevel
()

Retrieves the current framework start level.

public ServiceReferenceDTO

Returns:

The service representation as ServiceReferenceDTO.
getServiceReference
(long
Addresses the service by its identifier.
id
)

Get the service representation for a service given by its service Id.

public Collection<ServiceReferenceDTO>

Returns:

Returns the service representations in the form of ServiceReferenceDTO objects.
getServiceReferences
()

Get the service representations for all services.

public Collection<ServiceReferenceDTO>

Returns:

Returns the service representations in the form of ServiceReferenceDTO objects.
getServiceReferences
(String
Passes a filter to restrict the result set.
filter
)

Get the service representations for all services.

public BundleDTO

Returns:

Returns the BundleDTO of the newly installed bundle.
installBundle
(String
Passes the location string to retrieve the bundle content from.
location
)

Install a new bundle given by an externally reachable location string, typically describing a URL.

public void
setBundleStartLevel(long
Addresses the bundle by its identifier.
id
,
int
The target start level.
startLevel
)

Set the start level for a bundle given by its bundle Id.

public void
setFrameworkStartLevel(FrameworkStartLevelDTO
set the framework start level to this target.
startLevel
)

Sets the current framework start level.

public void
startBundle(long
Addresses the bundle by its identifier.
id
)

Start a bundle given by its bundle Id.

public void
startBundle(long
Addresses the bundle by its identifier.
id
,
int
Passes additional options as defined in org.osgi.framework.Bundle#start(int)
options
)

Start a bundle given by its bundle Id.

public void
stopBundle(long
Addresses the bundle by its identifier.
id
)

Stop a bundle given by its bundle Id.

public void
stopBundle(long
Addresses the bundle by its identifier.
id
,
int
Passes additional options as defined in org.osgi.framework.Bundle#stop(int)
options
)

Stop a bundle given by its bundle Id.

public BundleDTO

Returns:

Returns the BundleDTO of the uninstalled bundle.
uninstallBundle
(long
Addresses the bundle by its identifier.
id
)

Uninstall a bundle given by its bundle Id.

public BundleDTO

Returns:

Returns the BundleDTO of the updated bundle.
updateBundle
(long
Addresses the bundle by its identifier.
id
)

Updates a bundle given by its bundle Id using the bundle-internal update location.

public BundleDTO

Returns:

Returns the BundleDTO of the updated bundle.
updateBundle
(long
Addresses the bundle by its identifier.
id
,
String
The URL whose content is to be used to update the bundle.
url
)

Updates a bundle given by its URI path using the content at the specified URL.

Method Detail

getBundleback to summary
public BundleDTO getBundle(long id) throws Exception

Retrieve the bundle representation for a given bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Returns:BundleDTO

A BundleDTO for the requested bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getBundleHeadersback to summary
public Map<String, String> getBundleHeaders(long id) throws Exception

Get the header for a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Returns:Map<String, String>

Returns the map of headers entries.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getBundlesback to summary
public Collection<BundleDTO> getBundles() throws Exception

Get the bundle representations for all bundles currently installed in the managed framework.

Returns:Collection<BundleDTO>

Returns a collection of BundleDTO objects.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getBundleStartLevelback to summary
public BundleStartLevelDTO getBundleStartLevel(long id) throws Exception

Get the start level for a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Returns:BundleStartLevelDTO

Returns a BundleStartLevelDTO describing the current start level of the bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getBundleStateback to summary
public int getBundleState(long id) throws Exception

Get the state for a given bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Returns:int

Returns the current bundle state as defined in org.osgi.framework.Bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getFrameworkStartLevelback to summary
public FrameworkStartLevelDTO getFrameworkStartLevel() throws Exception

Retrieves the current framework start level.

Returns:FrameworkStartLevelDTO

Returns the current framework start level in the form of a FrameworkStartLevelDTO.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getServiceReferenceback to summary
public ServiceReferenceDTO getServiceReference(long id) throws Exception

Get the service representation for a service given by its service Id.

Parameters
id:long

Addresses the service by its identifier.

Returns:ServiceReferenceDTO

The service representation as ServiceReferenceDTO.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getServiceReferencesback to summary
public Collection<ServiceReferenceDTO> getServiceReferences() throws Exception

Get the service representations for all services.

Returns:Collection<ServiceReferenceDTO>

Returns the service representations in the form of ServiceReferenceDTO objects.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
getServiceReferencesback to summary
public Collection<ServiceReferenceDTO> getServiceReferences(String filter) throws Exception

Get the service representations for all services.

Parameters
filter:String

Passes a filter to restrict the result set.

Returns:Collection<ServiceReferenceDTO>

Returns the service representations in the form of ServiceReferenceDTO objects.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
installBundleback to summary
public BundleDTO installBundle(String location) throws Exception

Install a new bundle given by an externally reachable location string, typically describing a URL.

Parameters
location:String

Passes the location string to retrieve the bundle content from.

Returns:BundleDTO

Returns the BundleDTO of the newly installed bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
setBundleStartLevelback to summary
public void setBundleStartLevel(long id, int startLevel) throws Exception

Set the start level for a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

startLevel:int

The target start level.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
setFrameworkStartLevelback to summary
public void setFrameworkStartLevel(FrameworkStartLevelDTO startLevel) throws Exception

Sets the current framework start level.

Parameters
startLevel:FrameworkStartLevelDTO

set the framework start level to this target.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
startBundleback to summary
public void startBundle(long id) throws Exception

Start a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
startBundleback to summary
public void startBundle(long id, int options) throws Exception

Start a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

options:int

Passes additional options as defined in org.osgi.framework.Bundle#start(int)

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
stopBundleback to summary
public void stopBundle(long id) throws Exception

Stop a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
stopBundleback to summary
public void stopBundle(long id, int options) throws Exception

Stop a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

options:int

Passes additional options as defined in org.osgi.framework.Bundle#stop(int)

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
uninstallBundleback to summary
public BundleDTO uninstallBundle(long id) throws Exception

Uninstall a bundle given by its bundle Id.

Parameters
id:long

Addresses the bundle by its identifier.

Returns:BundleDTO

Returns the BundleDTO of the uninstalled bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
updateBundleback to summary
public BundleDTO updateBundle(long id) throws Exception

Updates a bundle given by its bundle Id using the bundle-internal update location.

Parameters
id:long

Addresses the bundle by its identifier.

Returns:BundleDTO

Returns the BundleDTO of the updated bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.
updateBundleback to summary
public BundleDTO updateBundle(long id, String url) throws Exception

Updates a bundle given by its URI path using the content at the specified URL.

Parameters
id:long

Addresses the bundle by its identifier.

url:String

The URL whose content is to be used to update the bundle.

Returns:BundleDTO

Returns the BundleDTO of the updated bundle.

Exceptions
Exception:
An exception representing a failure in the underlying remote call.