org.ow2.petals.binding.soap.listener.incoming
Class PetalsReceiver

java.lang.Object
  extended by org.apache.axis2.receivers.AbstractMessageReceiver
      extended by org.ow2.petals.binding.soap.listener.incoming.PetalsReceiver
All Implemented Interfaces:
org.apache.axis2.engine.MessageReceiver

public class PetalsReceiver
extends org.apache.axis2.receivers.AbstractMessageReceiver

The message receiver used by the binding component. The SOAP message is forwarded to the JBI endpoint.

Since:
Petals 1.0
Version:
$Id$
Author:
alouis,wjoseph,chamerling - EBM Websourcing

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.axis2.receivers.AbstractMessageReceiver
org.apache.axis2.receivers.AbstractMessageReceiver.AsyncMessageReceiverWorker, org.apache.axis2.receivers.AbstractMessageReceiver.ThreadContextDescriptor
 
Field Summary
protected  javax.jbi.messaging.DeliveryChannel channel
           
protected  org.ow2.petals.component.framework.AbstractComponent component
           
protected  java.util.logging.Logger logger
           
protected  java.util.Map<java.lang.String,RequestProcessor> requestProcessors
           
 
Fields inherited from class org.apache.axis2.receivers.AbstractMessageReceiver
DO_ASYNC, log, SAVED_MC, SAVED_TCCL, SCOPE, serviceTCCL
 
Constructor Summary
PetalsReceiver(org.ow2.petals.component.framework.AbstractComponent component, javax.jbi.messaging.DeliveryChannel channel, java.util.logging.Logger logger)
          Creates a new instance of PetalsReceiver
 
Method Summary
protected  void addProcessor(RequestProcessor processor)
          Add a processor to the processors list
protected  RequestProcessor getProcessor(org.apache.axis2.context.MessageContext context)
          Get the processor for the given message context.
protected  RequestProcessor getRESTProcessor()
          Get the REST processor
protected  RequestProcessor getSOAPProcessor()
          Get the SOAP processor
protected  void initRequestProcessors()
          Init the request processors.
 void invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext)
           
protected  org.apache.axis2.context.MessageContext process(org.apache.axis2.context.MessageContext inContext)
          Sends the SOAP Envelop of the request message directly to a JBI service and operation on the JBI container.
protected  void sendBackResponse(org.apache.axis2.context.MessageContext outMsgContext)
          Send the response to the WS consumer.
 
Methods inherited from class org.apache.axis2.receivers.AbstractMessageReceiver
getSOAPFactory, getTheImplementationObject, makeNewServiceObject, receive, replicateState, restoreThreadContext, setThreadContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestProcessors

protected java.util.Map<java.lang.String,RequestProcessor> requestProcessors

component

protected org.ow2.petals.component.framework.AbstractComponent component

channel

protected javax.jbi.messaging.DeliveryChannel channel

logger

protected java.util.logging.Logger logger
Constructor Detail

PetalsReceiver

public PetalsReceiver(org.ow2.petals.component.framework.AbstractComponent component,
                      javax.jbi.messaging.DeliveryChannel channel,
                      java.util.logging.Logger logger)
Creates a new instance of PetalsReceiver

Parameters:
context -
channel -
bindingSUM -
log -
Method Detail

initRequestProcessors

protected void initRequestProcessors()
Init the request processors. TODO : Add the processors from component configuration file.


addProcessor

protected void addProcessor(RequestProcessor processor)
Add a processor to the processors list

Parameters:
processor -

invokeBusinessLogic

public final void invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext)
                               throws org.apache.axis2.AxisFault
Specified by:
invokeBusinessLogic in class org.apache.axis2.receivers.AbstractMessageReceiver
Throws:
org.apache.axis2.AxisFault

sendBackResponse

protected void sendBackResponse(org.apache.axis2.context.MessageContext outMsgContext)
                         throws org.apache.axis2.AxisFault
Send the response to the WS consumer.

Parameters:
outMsgContext -
Throws:
org.apache.axis2.AxisFault

process

protected org.apache.axis2.context.MessageContext process(org.apache.axis2.context.MessageContext inContext)
                                                   throws org.apache.axis2.AxisFault
Sends the SOAP Envelop of the request message directly to a JBI service and operation on the JBI container. The response message from the JBI service invocation is transmitted as an outgoing message.

Parameters:
inMessage - MessageContext for incoming message.
performanceNotification - The performance notification whose the UID will be forwarded to the service provider.
Returns:
The out message context
Throws:
org.apache.axis2.AxisFault - error while processing request, send the JBI Exchange, processing the JBI response, or if the JBI response is a Fault.

getProcessor

protected RequestProcessor getProcessor(org.apache.axis2.context.MessageContext context)
Get the processor for the given message context.

Parameters:
context -
Returns:
the processor of the SOAP one which is the default one if no valid processor has been found.

getRESTProcessor

protected RequestProcessor getRESTProcessor()
Get the REST processor

Returns:

getSOAPProcessor

protected RequestProcessor getSOAPProcessor()
Get the SOAP processor

Returns:


Copyright © 2005-2010 OW2 Consortium. All Rights Reserved.