Package org.apache.axis2.receivers
Class AbstractMessageReceiver
java.lang.Object
org.apache.axis2.receivers.AbstractMessageReceiver
- All Implemented Interfaces:
MessageReceiver
- Direct Known Subclasses:
AbstractInMessageReceiver,AbstractInOutMessageReceiver,AbstractInOutSyncMessageReceiver,AbstractRobustInMessageReceiver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.axiom.soap.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 voidsetThreadContext(MessageContext msgContext) Several pieces of information need to be available to the service implementation class.
-
Field Details
-
log
protected static final org.apache.commons.logging.Log log -
SCOPE
- See Also:
-
serviceTCCL
-
SAVED_TCCL
- See Also:
-
SAVED_MC
- See Also:
-
DO_ASYNC
- See Also:
-
-
Constructor Details
-
AbstractMessageReceiver
public AbstractMessageReceiver()
-
-
Method Details
-
replicateState
- Throws:
ClusteringFault
-
invokeBusinessLogic
Do the actual work of the MessageReceiver. Must be overridden by concrete subclasses.- Parameters:
messageCtx- active MessageContext- Throws:
AxisFault- if a problem occurred
-
receive
- Specified by:
receivein interfaceMessageReceiver- Parameters:
messageCtx- active MessageContext- Throws:
AxisFault- if a problem occurred
-
setThreadContext
protected AbstractMessageReceiver.ThreadContextDescriptor setThreadContext(MessageContext msgContext) Several pieces of information need to be available to the service implementation class. For one, the ThreadContextClassLoader needs to be correct, and for another we need to give the service code access to the MessageContext (getCurrentContext()). So we toss these things in TLS.- Parameters:
msgContext- the current MessageContext- Returns:
- a ThreadContextDescriptor containing the old values
-
restoreThreadContext
-
makeNewServiceObject
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
- Throws:
AxisFault
-
getTheImplementationObject
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
-