org.apache.muse.core.routing
Interface ResourceRouter

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

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()
           
 Logger getLog()
           
 RouterPersistence getPersistence()
           
 Collection getResourceDefinitions()
           
 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 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

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

getLog

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

getPersistence

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

getResourceDefinitions

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

invoke

Element invoke(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

void setEnvironment(Environment environment)

setLog

void setLog(Logger log)

setPersistence

void setPersistence(RouterPersistence persistence)

setResourceDefinitions

void setResourceDefinitions(Collection definitions)


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.