Class BundleContextProvider
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.osgi.AbstractContextProvider
org.eclipse.jetty.osgi.BundleContextProvider
- All Implemented Interfaces:
AppProvider, BundleProvider, LifeCycle
BundleContextProvider
Handles deploying OSGi bundles that define a context xml file for configuring them.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassContextBundleTracker Track deployment of Bundles that should be deployed to Jetty as contexts.Nested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBundleContextProvider(String environment, Server server, ContextFactory contextFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbundleAdded(org.osgi.framework.Bundle bundle) Deploy a bundle as a Jetty context.booleanbundleRemoved(org.osgi.framework.Bundle bundle) Bundle has been removed.protected voiddoStart()Method to override to start the lifecycleprotected voiddoStop()Method to override to stop the lifecycleMethods inherited from class AbstractContextProvider
createContextHandler, getConfigurationClasses, getDefaultsDescriptor, getDeploymentManager, getEnvironmentName, getProperties, getServer, getTldBundles, isDeployable, isDeployable, isExtractWars, isParentLoaderPriority, setConfigurationClasses, setConfigurationClasses, setDefaultsDescriptor, setDeploymentManager, setExtractWars, setParentLoaderPriority, setTldBundlesMethods inherited from class AbstractLifeCycle
addEventListener, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
BundleContextProvider
-
-
Method Details
-
doStart
Description copied from class:AbstractLifeCycleMethod to override to start the lifecycle- Overrides:
doStartin classAbstractLifeCycle- Throws:
Exception- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:AbstractLifeCycleMethod to override to stop the lifecycle- Overrides:
doStopin classAbstractLifeCycle- Throws:
Exception- If there was a problem stopping. Will cause a transition to FAILED state
-
bundleAdded
Deploy a bundle as a Jetty context.- Specified by:
bundleAddedin interfaceBundleProvider- Throws:
Exception
-
bundleRemoved
Bundle has been removed. If it was a context we deployed, undeploy it.- Specified by:
bundleRemovedin interfaceBundleProvider- Parameters:
bundle- the bundle- Returns:
- true if this was a context we had deployed, false otherwise
- Throws:
Exception
-