Package org.eclipse.jetty.osgi
Class OSGiApp
java.lang.Object
org.eclipse.jetty.deploy.App
org.eclipse.jetty.osgi.OSGiApp
OSGiApp
Base class representing info about a WebAppContext/ContextHandler to be deployed into jetty.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.osgi.framework.Bundle
protected Resource
protected ContextHandler
protected String
protected String
protected org.osgi.framework.ServiceRegistration
-
Constructor Summary
ConstructorDescriptionOSGiApp
(DeploymentManager manager, AppProvider provider, org.osgi.framework.Bundle bundle) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
org.osgi.framework.Bundle
Get ContextHandler for the App.The context pathApp
relating to how it is installed on the jetty server side.org.osgi.framework.ServiceRegistration
void
Register the Jetty deployed context/webapp as a service, as according to the OSGi Web Application Specification.void
setContextHandler
(ContextHandler contextHandler) void
setContextPath
(String contextPath) void
setPathToResourceBase
(String path) void
setRegistration
(org.osgi.framework.ServiceRegistration registration) Methods inherited from class org.eclipse.jetty.deploy.App
getAppProvider, getDeploymentManager, getEnvironmentName, getPath, getProperties, toString
-
Field Details
-
_bundle
protected org.osgi.framework.Bundle _bundle -
_registration
protected org.osgi.framework.ServiceRegistration _registration -
_contextHandler
-
_pathToResourceBase
-
_contextPath
-
_bundleResource
-
-
Constructor Details
-
OSGiApp
public OSGiApp(DeploymentManager manager, AppProvider provider, org.osgi.framework.Bundle bundle) throws Exception - Parameters:
manager
- the DeploymentManager to which to deployprovider
- the provider that discovered the context/webappbundle
- the bundle associated with the context/webapp- Throws:
Exception
-
-
Method Details
-
getBundleResource
-
getContextHandler
Description copied from class:App
Get ContextHandler for the App. Create it if needed.- Overrides:
getContextHandler
in classApp
- Returns:
- the
ContextHandler
to use for the App when fully started. (Portions of which might be ignored when App is not yetAppLifeCycle.DEPLOYED
orAppLifeCycle.STARTED
) - Throws:
Exception
- if unable to get the context handler
-
setContextHandler
-
getPathToResourceBase
-
setPathToResourceBase
-
getContextPath
Description copied from class:App
The context pathApp
relating to how it is installed on the jetty server side.- Overrides:
getContextPath
in classApp
- Returns:
- the contextPath for the App
-
setContextPath
-
getBundleSymbolicName
-
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
Register the Jetty deployed context/webapp as a service, as according to the OSGi Web Application Specification.- Throws:
Exception
-
deregisterAsOSGiService
- Throws:
Exception
-