public abstract class AbstractTransportSender extends AbstractHandler implements TransportSender
Handler.InvocationResponse
Modifier and Type | Field and Description |
---|---|
protected ConfigurationContext |
cfgCtx
the axis2 configuration context
|
protected org.apache.commons.logging.Log |
log
the reference to the actual commons logger to be used for log messages
|
protected MetricsCollector |
metrics
Metrics collector for the sender
|
handlerDesc
Modifier | Constructor and Description |
---|---|
protected |
AbstractTransportSender()
A constructor that makes subclasses pick up the correct logger
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup(MessageContext msgContext)
Release resources associated with a given message context.
|
MessageContext |
createResponseMessageContext(MessageContext outMsgCtx)
Create a new axis MessageContext for an incoming response message
through this transport, for the given outgoing message
|
int |
getActiveThreadCount()
Returns the number of active threads processing messages
|
double |
getAvgSizeReceived() |
double |
getAvgSizeSent() |
long |
getBytesReceived() |
long |
getBytesSent() |
long |
getFaultsReceiving() |
long |
getFaultsSending() |
long |
getLastResetTime() |
long |
getMaxSizeReceived() |
long |
getMaxSizeSent() |
long |
getMessagesReceived() |
long |
getMessagesSent() |
long |
getMetricsWindow() |
long |
getMinSizeReceived() |
long |
getMinSizeSent() |
int |
getQueueSize()
Return the number of requests queued in the thread pool
|
Map |
getResponseCodeTable() |
long |
getTimeoutsReceiving() |
long |
getTimeoutsSending() |
String |
getTransportName() |
protected void |
handleException(String msg) |
protected void |
handleException(String msg,
Exception e) |
void |
handleIncomingMessage(MessageContext msgCtx,
Map trpHeaders,
String soapAction,
String contentType)
Process a new incoming message (Response) through the axis engine
|
void |
init(ConfigurationContext cfgCtx,
TransportOutDescription transportOut)
Initialize the generic transport sender.
|
Handler.InvocationResponse |
invoke(MessageContext msgContext)
This method will be called on each registered handler when a message
needs to be processed.
|
protected void |
logException(String msg,
Exception e) |
void |
maintenenceShutdown(long millis) |
void |
pause() |
void |
resetStatistics() |
void |
resume() |
abstract void |
sendMessage(MessageContext msgCtx,
String targetEPR,
OutTransportInfo outTransportInfo) |
void |
stop() |
protected boolean |
waitForSynchronousResponse(MessageContext msgCtx)
Should the transport sender wait for a synchronous response to be received?
|
flowComplete, getHandlerDesc, getName, getParameter, init, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
flowComplete, getHandlerDesc, getName, getParameter, init
protected org.apache.commons.logging.Log log
protected ConfigurationContext cfgCtx
protected MetricsCollector metrics
protected AbstractTransportSender()
public void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut) throws AxisFault
init
in interface TransportSender
cfgCtx
- the axis configuration contexttransportOut
- the transport-out descriptionAxisFault
- on errorpublic void stop()
stop
in interface TransportSender
public void cleanup(MessageContext msgContext) throws AxisFault
TransportSender
This method is mainly useful for connection oriented transports that return from
Handler.invoke(MessageContext)
before the entire response is available. A transport of
this type will construct an InputStream
object and set it as the
MessageContext.TRANSPORT_IN
property on the
OperationContext
). In order for this to work, the
connection must remain open until the response has been processed. This method is then
used to release the connection explicitly.
cleanup
in interface TransportSender
AxisFault
public abstract void sendMessage(MessageContext msgCtx, String targetEPR, OutTransportInfo outTransportInfo) throws AxisFault
AxisFault
public Handler.InvocationResponse invoke(MessageContext msgContext) throws AxisFault
Handler
public void handleIncomingMessage(MessageContext msgCtx, Map trpHeaders, String soapAction, String contentType)
msgCtx
- the axis MessageContexttrpHeaders
- the map containing transport level message headerssoapAction
- the optional soap action or nullcontentType
- the optional content-type for the messagepublic MessageContext createResponseMessageContext(MessageContext outMsgCtx)
outMsgCtx
- the outgoing messageprotected boolean waitForSynchronousResponse(MessageContext msgCtx)
msgCtx
- the outgoing message contextpublic String getTransportName()
protected void handleException(String msg, Exception e) throws AxisFault
AxisFault
public int getActiveThreadCount()
public int getQueueSize()
public long getMessagesReceived()
public long getFaultsReceiving()
public long getBytesReceived()
public long getMessagesSent()
public long getFaultsSending()
public long getBytesSent()
public long getTimeoutsReceiving()
public long getTimeoutsSending()
public long getMinSizeReceived()
public long getMaxSizeReceived()
public double getAvgSizeReceived()
public long getMinSizeSent()
public long getMaxSizeSent()
public double getAvgSizeSent()
public Map getResponseCodeTable()
public void resetStatistics()
public long getLastResetTime()
public long getMetricsWindow()
Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.