Package org.apache.axis2.transport.base
Class AbstractTransportSender
java.lang.Object
org.apache.axis2.handlers.AbstractHandler
org.apache.axis2.transport.base.AbstractTransportSender
- All Implemented Interfaces:
org.apache.axis2.engine.Handler,org.apache.axis2.kernel.TransportSender
public abstract class AbstractTransportSender
extends org.apache.axis2.handlers.AbstractHandler
implements org.apache.axis2.kernel.TransportSender
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler
org.apache.axis2.engine.Handler.InvocationResponse -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.axis2.context.ConfigurationContextthe axis2 configuration contextprotected org.apache.commons.logging.Logthe reference to the actual commons logger to be used for log messagesprotected MetricsCollectorMetrics collector for the senderFields inherited from class org.apache.axis2.handlers.AbstractHandler
handlerDesc -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedA constructor that makes subclasses pick up the correct logger -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(org.apache.axis2.context.MessageContext msgContext) org.apache.axis2.context.MessageContextcreateResponseMessageContext(org.apache.axis2.context.MessageContext outMsgCtx) Create a new axis MessageContext for an incoming response message through this transport, for the given outgoing messageintReturns the number of active threads processing messagesdoubledoublelonglonglonglonglonglonglonglonglonglonglonglongintReturn the number of requests queued in the thread poollonglongprotected voidhandleException(String msg) protected voidhandleException(String msg, Exception e) voidhandleIncomingMessage(org.apache.axis2.context.MessageContext msgCtx, Map trpHeaders, String soapAction, String contentType) Process a new incoming message (Response) through the axis enginevoidinit(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportOutDescription transportOut) Initialize the generic transport sender.org.apache.axis2.engine.Handler.InvocationResponseinvoke(org.apache.axis2.context.MessageContext msgContext) protected voidlogException(String msg, Exception e) voidmaintenenceShutdown(long millis) voidpause()voidvoidresume()abstract voidsendMessage(org.apache.axis2.context.MessageContext msgCtx, String targetEPR, org.apache.axis2.kernel.OutTransportInfo outTransportInfo) voidstop()protected booleanwaitForSynchronousResponse(org.apache.axis2.context.MessageContext msgCtx) Should the transport sender wait for a synchronous response to be received?Methods inherited from class org.apache.axis2.handlers.AbstractHandler
flowComplete, getHandlerDesc, getName, getParameter, init, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.axis2.engine.Handler
flowComplete, getHandlerDesc, getName, getParameter, init
-
Field Details
-
log
protected org.apache.commons.logging.Log logthe reference to the actual commons logger to be used for log messages -
cfgCtx
protected org.apache.axis2.context.ConfigurationContext cfgCtxthe axis2 configuration context -
metrics
Metrics collector for the sender
-
-
Constructor Details
-
AbstractTransportSender
protected AbstractTransportSender()A constructor that makes subclasses pick up the correct logger
-
-
Method Details
-
init
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportOutDescription transportOut) throws org.apache.axis2.AxisFault Initialize the generic transport sender.- Specified by:
initin interfaceorg.apache.axis2.kernel.TransportSender- Parameters:
cfgCtx- the axis configuration contexttransportOut- the transport-out description- Throws:
org.apache.axis2.AxisFault- on error
-
stop
public void stop()- Specified by:
stopin interfaceorg.apache.axis2.kernel.TransportSender
-
cleanup
public void cleanup(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault - Specified by:
cleanupin interfaceorg.apache.axis2.kernel.TransportSender- Throws:
org.apache.axis2.AxisFault
-
sendMessage
public abstract void sendMessage(org.apache.axis2.context.MessageContext msgCtx, String targetEPR, org.apache.axis2.kernel.OutTransportInfo outTransportInfo) throws org.apache.axis2.AxisFault - Throws:
org.apache.axis2.AxisFault
-
invoke
public org.apache.axis2.engine.Handler.InvocationResponse invoke(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault - Specified by:
invokein interfaceorg.apache.axis2.engine.Handler- Throws:
org.apache.axis2.AxisFault
-
handleIncomingMessage
public void handleIncomingMessage(org.apache.axis2.context.MessageContext msgCtx, Map trpHeaders, String soapAction, String contentType) Process a new incoming message (Response) through the axis engine- Parameters:
msgCtx- the axis MessageContexttrpHeaders- the map containing transport level message headerssoapAction- the optional soap action or nullcontentType- the optional content-type for the message
-
createResponseMessageContext
public org.apache.axis2.context.MessageContext createResponseMessageContext(org.apache.axis2.context.MessageContext outMsgCtx) Create a new axis MessageContext for an incoming response message through this transport, for the given outgoing message- Parameters:
outMsgCtx- the outgoing message- Returns:
- the newly created message context
-
waitForSynchronousResponse
protected boolean waitForSynchronousResponse(org.apache.axis2.context.MessageContext msgCtx) Should the transport sender wait for a synchronous response to be received?- Parameters:
msgCtx- the outgoing message context- Returns:
- true if a sync response is expected
-
getTransportName
-
handleException
- Throws:
org.apache.axis2.AxisFault
-
handleException
- Throws:
org.apache.axis2.AxisFault
-
logException
-
pause
public void pause() throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-
resume
public void resume() throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-
maintenenceShutdown
public void maintenenceShutdown(long millis) throws org.apache.axis2.AxisFault - Throws:
org.apache.axis2.AxisFault
-
getActiveThreadCount
public int getActiveThreadCount()Returns the number of active threads processing messages- Returns:
- number of active threads processing messages
-
getQueueSize
public int getQueueSize()Return the number of requests queued in the thread pool- Returns:
- queue size
-
getMessagesReceived
public long getMessagesReceived() -
getFaultsReceiving
public long getFaultsReceiving() -
getBytesReceived
public long getBytesReceived() -
getMessagesSent
public long getMessagesSent() -
getFaultsSending
public long getFaultsSending() -
getBytesSent
public long getBytesSent() -
getTimeoutsReceiving
public long getTimeoutsReceiving() -
getTimeoutsSending
public long getTimeoutsSending() -
getMinSizeReceived
public long getMinSizeReceived() -
getMaxSizeReceived
public long getMaxSizeReceived() -
getAvgSizeReceived
public double getAvgSizeReceived() -
getMinSizeSent
public long getMinSizeSent() -
getMaxSizeSent
public long getMaxSizeSent() -
getAvgSizeSent
public double getAvgSizeSent() -
getResponseCodeTable
-
resetStatistics
public void resetStatistics() -
getLastResetTime
public long getLastResetTime() -
getMetricsWindow
public long getMetricsWindow()
-