|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.core.routing.SimpleResourceRouter
public class 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()
|
Logger |
getLog()
|
RouterPersistence |
getPersistence()
|
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. |
Element |
invoke(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(Logger log)
|
void |
setPersistence(RouterPersistence persistence)
|
void |
setResourceDefinitions(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 ResourceRouter
public Logger getLog()
getLog
in interface ResourceRouter
public RouterPersistence getPersistence()
getPersistence
in interface ResourceRouter
public Collection getResourceDefinitions()
getResourceDefinitions
in interface ResourceRouter
public ResourceManager getResourceManager()
protected Resource getTargetResource() throws SoapFault
SoapFault
- MessageHeaders.getToAddress()
,
ResourceManager.getResource(EndpointReference)
public boolean hasBeenInitialized()
hasBeenInitialized
in interface Initialization
public boolean hasBeenShutdown()
hasBeenShutdown
in interface Shutdown
public void initialize() throws SoapFault
initialize
in interface Initialization
SoapFault
public Element invoke(Element soapBody)
ResourceRouter
invoke
in interface ResourceRouter
soapBody
- The parameters for the method, still in their SOAP Body form.
Resource.invoke(Element)
public void setEnvironment(Environment environment)
setEnvironment
in interface ResourceRouter
public void setLog(Logger log)
setLog
in interface ResourceRouter
public void setPersistence(RouterPersistence persistence)
setPersistence
in interface ResourceRouter
public void setResourceDefinitions(Collection resourceDefinitions)
setResourceDefinitions
in interface ResourceRouter
public void setResourceManager(ResourceManager resourceManager)
public void shutdown()
shutdown
in interface Shutdown
getResourceManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |