org.apache.muse.core.platform.osgi.routing
Class OSGiResourceRouter
java.lang.Object
org.apache.muse.core.routing.SimpleResourceRouter
org.apache.muse.core.platform.osgi.routing.OSGiResourceRouter
- All Implemented Interfaces:
- EventListener, Initialization, ResourceRouter, Shutdown, org.osgi.framework.BundleListener
public class OSGiResourceRouter
- extends SimpleResourceRouter
- implements org.osgi.framework.BundleListener
OSGiResourceRouter is an extension of the SimpleResourceRouter that supports
a delegation model for additional Muse-enabled Bundles. This class is intended
for use by ResourceManagementProvider
implementations. It is not
intended for use by normal Muse-enabled bundles.
- Author:
- Joel Hawkins (joelh)
- See Also:
ResourceManagementProvider
Methods inherited from class org.apache.muse.core.routing.SimpleResourceRouter |
getEnvironment, getLog, getPersistence, getResourceDefinitions, getResourceManager, getTargetResource, hasBeenInitialized, hasBeenShutdown, initialize, setLog, setPersistence, setResourceDefinitions, setResourceManager, shutdown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OSGiResourceRouter
public OSGiResourceRouter()
getDefault
public static OSGiResourceRouter getDefault()
createResourceManager
protected ResourceManager createResourceManager()
- Description copied from class:
SimpleResourceRouter
- This method can be overridden to provide an alternate implementation
of the ResourceManager component to the router.
- Overrides:
createResourceManager
in class SimpleResourceRouter
- Returns:
- An instance of SimpleResourceManager.
getDelegateBundle
public org.osgi.framework.Bundle getDelegateBundle()
invoke
public Element invoke(Element soapBody)
- Description copied from interface:
ResourceRouter
- This is a generic method invocation mechanism that can be used to
delegate request handling to a specific Resource. This method should be
used by the isolation layer in order to process external requests.
- Specified by:
invoke
in interface ResourceRouter
- Overrides:
invoke
in class SimpleResourceRouter
- Parameters:
soapBody
- The parameters for the method, still in their SOAP Body form.
- Returns:
- The return value of the method, in SOAP Body form. If there was
an error while processing the request, the value will be a
SOAP v1.2 fault, in XML form.
- See Also:
Resource.invoke(Element)
setEnvironment
public void setEnvironment(Environment environment)
- Specified by:
setEnvironment
in interface ResourceRouter
- Overrides:
setEnvironment
in class SimpleResourceRouter
initialize
public void initialize(org.osgi.framework.BundleContext context)
attachManagementProvider
public void attachManagementProvider(ResourceManagementProvider provider)
releaseManagementProvider
public void releaseManagementProvider()
addResourceDefinitions
protected void addResourceDefinitions(org.osgi.framework.Bundle bundle,
Collection definitions)
getDocument
public Document getDocument(org.osgi.framework.Bundle bundle,
URL resourceConfig)
deferBundleResources
protected void deferBundleResources(org.osgi.framework.Bundle bundle,
String contextName,
String target)
addResourceDefinitions
protected void addResourceDefinitions(org.osgi.framework.Bundle bundle,
URL resourceConfig)
registerBundleResources
protected void registerBundleResources(org.osgi.framework.Bundle bundle,
String contextPath,
String target)
setDelegateBundle
public void setDelegateBundle(org.osgi.framework.Bundle bundle,
String contextPath,
String context)
removeBundleResources
protected void removeBundleResources(org.osgi.framework.Bundle bundle)
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged
in interface org.osgi.framework.BundleListener
Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.