Class OSGiApp

java.lang.Object
org.eclipse.jetty.deploy.App
org.eclipse.jetty.osgi.OSGiApp

public class OSGiApp extends App
OSGiApp Base class representing info about a WebAppContext/ContextHandler to be deployed into jetty.
  • Field Details

    • _bundle

      protected org.osgi.framework.Bundle _bundle
    • _registration

      protected org.osgi.framework.ServiceRegistration _registration
    • _contextHandler

      protected ContextHandler _contextHandler
    • _pathToResourceBase

      protected String _pathToResourceBase
    • _contextPath

      protected String _contextPath
    • _bundleResource

      protected Resource _bundleResource
  • Constructor Details

    • OSGiApp

      public OSGiApp(DeploymentManager manager, AppProvider provider, org.osgi.framework.Bundle bundle) throws Exception
      Parameters:
      manager - the DeploymentManager to which to deploy
      provider - the provider that discovered the context/webapp
      bundle - the bundle associated with the context/webapp
      Throws:
      Exception
  • Method Details

    • getBundleResource

      public Resource getBundleResource()
    • getContextHandler

      public ContextHandler getContextHandler() throws Exception
      Description copied from class: App
      Get ContextHandler for the App. Create it if needed.
      Overrides:
      getContextHandler in class App
      Returns:
      the ContextHandler to use for the App when fully started. (Portions of which might be ignored when App is not yet AppLifeCycle.DEPLOYED or AppLifeCycle.STARTED)
      Throws:
      Exception - if unable to get the context handler
    • setContextHandler

      public void setContextHandler(ContextHandler contextHandler)
    • getPathToResourceBase

      public String getPathToResourceBase()
    • setPathToResourceBase

      public void setPathToResourceBase(String path)
    • getContextPath

      public String getContextPath()
      Description copied from class: App
      The context path App relating to how it is installed on the jetty server side.
      Overrides:
      getContextPath in class App
      Returns:
      the contextPath for the App
    • setContextPath

      public void setContextPath(String contextPath)
    • getBundleSymbolicName

      public String getBundleSymbolicName()
    • getBundleVersionAsString

      public String getBundleVersionAsString()
    • getBundle

      public org.osgi.framework.Bundle getBundle()
    • setRegistration

      public void setRegistration(org.osgi.framework.ServiceRegistration registration)
    • getRegistration

      public org.osgi.framework.ServiceRegistration getRegistration()
    • registerAsOSGiService

      public void registerAsOSGiService() throws Exception
      Register the Jetty deployed context/webapp as a service, as according to the OSGi Web Application Specification.
      Throws:
      Exception
    • deregisterAsOSGiService

      protected void deregisterAsOSGiService() throws Exception
      Throws:
      Exception