org.ogf.graap.wsag.wsrf.impl
Class WSAG4JResourceRouter

java.lang.Object
  extended by org.apache.muse.core.routing.SimpleResourceRouter
      extended by org.ogf.graap.wsag.wsrf.impl.WSAG4JResourceRouter
All Implemented Interfaces:
org.apache.muse.core.Initialization, org.apache.muse.core.routing.ResourceRouter, org.apache.muse.core.Shutdown

public class WSAG4JResourceRouter
extends org.apache.muse.core.routing.SimpleResourceRouter

SimpleResourceRouter

Author:
Oliver Waeldrich

Constructor Summary
WSAG4JResourceRouter()
           
 
Method Summary
protected  org.apache.muse.core.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 hasBeenShutdown()
           
 void initialize()
          Initializes the WS Resource Router.
 Element invoke(Element request)
          Invokes a SOAP request on the resource router.
 void shutdown()
           
 
Methods inherited from class org.apache.muse.core.routing.SimpleResourceRouter
createResourceManager, getEnvironment, getLog, getPersistence, getResourceDefinitions, getResourceManager, hasBeenInitialized, setEnvironment, setLog, setPersistence, setResourceDefinitions, setResourceManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSAG4JResourceRouter

public WSAG4JResourceRouter()
Method Detail

initialize

public void initialize()
                throws org.apache.muse.ws.addressing.soap.SoapFault
Initializes the WS Resource Router.

Specified by:
initialize in interface org.apache.muse.core.Initialization
Overrides:
initialize in class org.apache.muse.core.routing.SimpleResourceRouter
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates a initialization fault
See Also:
SimpleResourceRouter.initialize()

getTargetResource

protected org.apache.muse.core.Resource getTargetResource()
                                                   throws org.apache.muse.ws.addressing.soap.SoapFault
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. This method is essential to all routing activity. The resource returned is guaranteed to be the resource specified by the client, but it is not guaranteed to support the specified operation.

Overrides:
getTargetResource in class org.apache.muse.core.routing.SimpleResourceRouter
Returns:
The resource whose EPR maps to the WS-A data in the current request.
Throws:
org.apache.muse.ws.addressing.soap.SoapFault -
  • If the EPR (including any unique reference properties) is not associated with any resource instance.
See Also:
MessageHeaders.getToAddress(), ResourceManager.getResource(EndpointReference)

invoke

public Element invoke(Element request)
Invokes a SOAP request on the resource router.

Specified by:
invoke in interface org.apache.muse.core.routing.ResourceRouter
Overrides:
invoke in class org.apache.muse.core.routing.SimpleResourceRouter
Parameters:
request - the SOAP request as DOM document
Returns:
the SOAP response (this might also be a SOAP error)
See Also:
SimpleResourceRouter.invoke(org.w3c.dom.Element)

shutdown

public void shutdown()
Specified by:
shutdown in interface org.apache.muse.core.Shutdown
Overrides:
shutdown in class org.apache.muse.core.routing.SimpleResourceRouter

hasBeenShutdown

public boolean hasBeenShutdown()
Specified by:
hasBeenShutdown in interface org.apache.muse.core.Shutdown
Overrides:
hasBeenShutdown in class org.apache.muse.core.routing.SimpleResourceRouter


Copyright © 2008-2012. All Rights Reserved.