Interface FrameworkManager

All Known Subinterfaces:
FrameworkNodeStatus

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

    • getBundle

      BundleDTO getBundle(long id) throws Exception
      Retrieve the bundle representation for a given bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      Returns:
      A BundleDTO for the requested bundle.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • getBundleHeaders

      Map<String,String> getBundleHeaders(long id) throws Exception
      Get 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:
      Exception - An exception representing a failure in the underlying remote call.
    • getBundles

      Collection<BundleDTO> getBundles() throws Exception
      Get the bundle representations for all bundles currently installed in the managed framework.
      Returns:
      Returns a collection of BundleDTO objects.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • getBundleStartLevel

      BundleStartLevelDTO getBundleStartLevel(long id) throws Exception
      Get the start level for a bundle given by its bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      Returns:
      Returns a BundleStartLevelDTO describing the current start level of the bundle.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • getBundleState

      int getBundleState(long id) throws Exception
      Get 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:
      Exception - An exception representing a failure in the underlying remote call.
    • getFrameworkStartLevel

      FrameworkStartLevelDTO getFrameworkStartLevel() throws Exception
      Retrieves the current framework start level.
      Returns:
      Returns the current framework start level in the form of a FrameworkStartLevelDTO.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • getServiceReference

      ServiceReferenceDTO getServiceReference(long id) throws Exception
      Get 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:
      Exception - An exception representing a failure in the underlying remote call.
    • getServiceReferences

      Collection<ServiceReferenceDTO> getServiceReferences() throws Exception
      Get the service representations for all services.
      Returns:
      Returns the service representations in the form of ServiceReferenceDTO objects.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • getServiceReferences

      Collection<ServiceReferenceDTO> getServiceReferences(String filter) throws Exception
      Get 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 ServiceReferenceDTO objects.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • installBundle

      BundleDTO installBundle(String location) throws Exception
      Install 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 BundleDTO of the newly installed bundle.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • setBundleStartLevel

      void setBundleStartLevel(long id, int startLevel) throws Exception
      Set 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:
      Exception - An exception representing a failure in the underlying remote call.
    • setFrameworkStartLevel

      void setFrameworkStartLevel(FrameworkStartLevelDTO startLevel) throws Exception
      Sets the current framework start level.
      Parameters:
      startLevel - set the framework start level to this target.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • startBundle

      void startBundle(long id) throws Exception
      Start a bundle given by its bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • startBundle

      void startBundle(long id, int options) throws Exception
      Start a bundle given by its bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      options - Passes additional options as defined in Bundle.start(int)
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • stopBundle

      void stopBundle(long id) throws Exception
      Stop a bundle given by its bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • stopBundle

      void stopBundle(long id, int options) throws Exception
      Stop a bundle given by its bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      options - Passes additional options as defined in Bundle.stop(int)
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • uninstallBundle

      BundleDTO uninstallBundle(long id) throws Exception
      Uninstall a bundle given by its bundle Id.
      Parameters:
      id - Addresses the bundle by its identifier.
      Returns:
      Returns the BundleDTO of the uninstalled bundle.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • updateBundle

      BundleDTO updateBundle(long id) throws Exception
      Updates a bundle given by its bundle Id using the bundle-internal update location.
      Parameters:
      id - Addresses the bundle by its identifier.
      Returns:
      Returns the BundleDTO of the updated bundle.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.
    • updateBundle

      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 - Addresses the bundle by its identifier.
      url - The URL whose content is to be used to update the bundle.
      Returns:
      Returns the BundleDTO of the updated bundle.
      Throws:
      Exception - An exception representing a failure in the underlying remote call.