org.apache.muse.core.routing
Interface ResourceRouter

All Superinterfaces:
Initialization, Shutdown
All Known Implementing Classes:
SimpleResourceRouter

public interface ResourceRouter
extends Initialization, Shutdown

ResourceRouter is the gateway to the generic resource layer that sits on top of the isolation layer. It is generic because it has no platform-specific dependencies - it uses raw SOAP and WS-Addressing data to match requests with the resources being targeted by the client. The isolation layer simply extracts this data in the platform-specific way and then delegates control to the ResourceRouter, which further delegates to an individual Resource object. There should only be one ResourceRouter per application.

Author:
Dan Jemiolo (danj)

Method Summary
 Environment getEnvironment()
           
 java.util.logging.Logger getLog()
           
 RouterPersistence getPersistence()
           
 java.util.Collection getResourceDefinitions()
           
 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 definitions)
           
 
Methods inherited from interface org.apache.muse.core.Initialization
hasBeenInitialized, initialize
 
Methods inherited from interface org.apache.muse.core.Shutdown
hasBeenShutdown, shutdown
 

Method Detail

getEnvironment

public Environment getEnvironment()
Returns:
The router's access point for things such as the WS-Addressing context, file system resources, and more.

getLog

public java.util.logging.Logger getLog()
Returns:
The JDK logger that writes to the Muse log file.

getPersistence

public RouterPersistence getPersistence()
Returns:
The persistence mechanism for the router, or null if none was defined.

getResourceDefinitions

public java.util.Collection getResourceDefinitions()
Returns:
The collection of ResourceDefinition objects representing all of the resource types that the router controls.

invoke

public 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. This method should be used by the isolation layer in order to process external requests.

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)

setLog

public void setLog(java.util.logging.Logger log)

setPersistence

public void setPersistence(RouterPersistence persistence)

setResourceDefinitions

public void setResourceDefinitions(java.util.Collection definitions)