|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.muse.core.routing.SimpleResourceRouter
SimpleResourceRouter is Muse's default implementation of a router that uses the implied resource pattern to delegate requests to resources. It uses the WS-A header data to map the request to a particular resource in its ResourceManager.
| Constructor Summary | |
|---|---|
SimpleResourceRouter()
|
|
| Method Summary | |
|---|---|
protected ResourceManager |
createResourceManager()
This method can be overridden to provide an alternate implementation of the ResourceManager component to the router. |
Environment |
getEnvironment()
|
java.util.logging.Logger |
getLog()
|
RouterPersistence |
getPersistence()
|
java.util.Collection |
getResourceDefinitions()
|
ResourceManager |
getResourceManager()
|
protected Resource |
getTargetResource()
Queries the Environment to get the WS-A EPR being targeted by the current request and then does a lookup in the ResourceManager with that EPR. |
boolean |
hasBeenInitialized()
|
boolean |
hasBeenShutdown()
|
void |
initialize()
This implementation performs initialization using the steps below. |
org.w3c.dom.Element |
invoke(org.w3c.dom.Element soapBody)
This is a generic method invocation mechanism that can be used to delegate request handling to a specific Resource. |
void |
setEnvironment(Environment environment)
|
void |
setLog(java.util.logging.Logger log)
|
void |
setPersistence(RouterPersistence persistence)
|
void |
setResourceDefinitions(java.util.Collection resourceDefinitions)
|
void |
setResourceManager(ResourceManager resourceManager)
|
void |
shutdown()
This implementation iterates over the collection of resources in the ResourceManager and destroys each one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleResourceRouter()
| Method Detail |
protected ResourceManager createResourceManager()
public Environment getEnvironment()
getEnvironment in interface ResourceRouterpublic java.util.logging.Logger getLog()
getLog in interface ResourceRouterpublic RouterPersistence getPersistence()
getPersistence in interface ResourceRouterpublic java.util.Collection getResourceDefinitions()
getResourceDefinitions in interface ResourceRouterpublic ResourceManager getResourceManager()
protected Resource getTargetResource()
throws SoapFault
SoapFault - MessageHeaders.getToAddress(),
ResourceManager.getResource(EndpointReference)public boolean hasBeenInitialized()
hasBeenInitialized in interface Initializationpublic boolean hasBeenShutdown()
hasBeenShutdown in interface Shutdown
public void initialize()
throws SoapFault
initialize in interface InitializationSoapFaultpublic org.w3c.dom.Element invoke(org.w3c.dom.Element soapBody)
ResourceRouter
invoke in interface ResourceRoutersoapBody - The parameters for the method, still in their SOAP Body form.
Resource.invoke(Element)public void setEnvironment(Environment environment)
setEnvironment in interface ResourceRouterpublic void setLog(java.util.logging.Logger log)
setLog in interface ResourceRouterpublic void setPersistence(RouterPersistence persistence)
setPersistence in interface ResourceRouterpublic void setResourceDefinitions(java.util.Collection resourceDefinitions)
setResourceDefinitions in interface ResourceRouterpublic void setResourceManager(ResourceManager resourceManager)
public void shutdown()
shutdown in interface ShutdowngetResourceManager()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||