Package org.apache.axis2.receivers
Class AbstractMessageReceiver
- java.lang.Object
-
- org.apache.axis2.receivers.AbstractMessageReceiver
-
- All Implemented Interfaces:
MessageReceiver
- Direct Known Subclasses:
AbstractInOutMessageReceiver,RawXMLINOnlyMessageReceiver,RawXMLINOutMessageReceiver,RPCInOnlyMessageReceiver,RPCInOutAsyncMessageReceiver
public abstract class AbstractMessageReceiver extends Object implements MessageReceiver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractMessageReceiver.AsyncMessageReceiverWorker
-
Constructor Summary
Constructors Constructor Description AbstractMessageReceiver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SOAPFactorygetSOAPFactory(MessageContext msgContext)protected ObjectgetTheImplementationObject(MessageContext msgContext)Retrieve the implementation object.protected abstract voidinvokeBusinessLogic(MessageContext messageCtx)Do the actual work of the MessageReceiver.protected ObjectmakeNewServiceObject(MessageContext msgContext)Create a new service object.voidreceive(MessageContext messageCtx)protected voidreplicateState(MessageContext messageContext)protected voidrestoreThreadContext(ThreadContextDescriptor tc)
-
-
-
Field Detail
-
log
protected static final org.apache.commons.logging.Log log
-
SCOPE
public static final String SCOPE
- See Also:
- Constant Field Values
-
serviceTCCL
protected String serviceTCCL
-
SAVED_TCCL
public static final String SAVED_TCCL
- See Also:
- Constant Field Values
-
SAVED_MC
public static final String SAVED_MC
- See Also:
- Constant Field Values
-
DO_ASYNC
public static final String DO_ASYNC
- See Also:
- Constant Field Values
-
-
Method Detail
-
replicateState
protected void replicateState(MessageContext messageContext) throws ClusteringFault
- Throws:
ClusteringFault
-
invokeBusinessLogic
protected abstract void invokeBusinessLogic(MessageContext messageCtx) throws AxisFault
Do the actual work of the MessageReceiver. Must be overridden by concrete subclasses.- Parameters:
messageCtx- active MessageContext- Throws:
AxisFault- if a problem occurred
-
receive
public void receive(MessageContext messageCtx) throws AxisFault
- Specified by:
receivein interfaceMessageReceiver- Parameters:
messageCtx- active MessageContext- Throws:
AxisFault- if a problem occurred
-
restoreThreadContext
protected void restoreThreadContext(ThreadContextDescriptor tc)
-
makeNewServiceObject
protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault
Create a new service object. Override if you want to customize how this happens in your own MessageReceiver.- Parameters:
msgContext-- Returns:
- Returns Object.
- Throws:
AxisFault
-
getSOAPFactory
public SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault
- Throws:
AxisFault
-
getTheImplementationObject
protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault
Retrieve the implementation object. This will either return a cached object if present in the ServiceContext, or create a new one via makeNewServiceObject() (and then cache that).- Parameters:
msgContext- the active MessageContext- Returns:
- the appropriate back-end service object.
- Throws:
AxisFault- if there's a problem
-
-