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
  • Field Details

    • log

      protected org.apache.commons.logging.Log log
      the reference to the actual commons logger to be used for log messages
    • cfgCtx

      protected org.apache.axis2.context.ConfigurationContext cfgCtx
      the axis2 configuration context
    • metrics

      protected MetricsCollector 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:
      init in interface org.apache.axis2.kernel.TransportSender
      Parameters:
      cfgCtx - the axis configuration context
      transportOut - the transport-out description
      Throws:
      org.apache.axis2.AxisFault - on error
    • stop

      public void stop()
      Specified by:
      stop in interface org.apache.axis2.kernel.TransportSender
    • cleanup

      public void cleanup(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault
      Specified by:
      cleanup in interface org.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:
      invoke in interface org.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 MessageContext
      trpHeaders - the map containing transport level message headers
      soapAction - the optional soap action or null
      contentType - 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

      public String getTransportName()
    • handleException

      protected void handleException(String msg, Exception e) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • handleException

      protected void handleException(String msg) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • logException

      protected void logException(String msg, Exception e)
    • 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

      public Map getResponseCodeTable()
    • resetStatistics

      public void resetStatistics()
    • getLastResetTime

      public long getLastResetTime()
    • getMetricsWindow

      public long getMetricsWindow()