xsul.epr_router
Class HttpEndpointReferenceBasedRouter

java.lang.Object
  extended byxsul.epr_router.HttpEndpointReferenceBasedRouter
All Implemented Interfaces:
MessageProcessingNode

public class HttpEndpointReferenceBasedRouter
extends java.lang.Object
implements MessageProcessingNode

Routes based on WSA EPR to specific XBeans document dispatcher

Version:
$Revision: 1.4 $
Author:
Yogesh L. Simmhan [mailto:ysimmhan@cs.indiana.edu]

Constructor Summary
HttpEndpointReferenceBasedRouter()
           
 
Method Summary
 XBeansDocumentDispatcher getDocumentProcessor(HttpEndpointReference endpoint)
          gets the document processor for the given endpoint.
 boolean process(MessageContext context)
          check if message context is http content.
 boolean removeDocumentProcessor(HttpEndpointReference endpoint)
          Method removeDocumentProcessor.
 void setDocumentProcessor(HttpEndpointReference endpoint, XBeansDocumentDispatcher endpointDocProcessor)
          sets the document processot for the given endpoint, replacing the previous one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpEndpointReferenceBasedRouter

public HttpEndpointReferenceBasedRouter()
                                 throws DynamicInfosetProcessorException
Method Detail

getDocumentProcessor

public XBeansDocumentDispatcher getDocumentProcessor(HttpEndpointReference endpoint)
gets the document processor for the given endpoint. If none available, one will be created.

Parameters:
endpoint - an Endpoint
Returns:
an EndpointDocumentProcessor

setDocumentProcessor

public void setDocumentProcessor(HttpEndpointReference endpoint,
                                 XBeansDocumentDispatcher endpointDocProcessor)
sets the document processot for the given endpoint, replacing the previous one.

Throws:
IOException
DynamicInfosetProcessorException

removeDocumentProcessor

public boolean removeDocumentProcessor(HttpEndpointReference endpoint)
Method removeDocumentProcessor. Removes the document processor for given EPR

Parameters:
endpoint - a HttpEndpointReference
Returns:
true if processor exited for EPR and was removed. False if processor dod not exist.

process

public boolean process(MessageContext context)
                throws MessageProcessingException
check if message context is http content. parse message context to get the HTTP path, which corresponds to the endpoint address in ws-addressing. locate the handler for this endpoint and call the process method in the handler. Return true to indicate that processingis finished (no more links inchains will be called).

Specified by:
process in interface MessageProcessingNode
Throws:
MessageProcessingException


IU Extreme! Lab (http://www.extreme.indiana.edu)