Class HttpCoreNIOSender

java.lang.Object
org.apache.axis2.handlers.AbstractHandler
org.apache.synapse.transport.nhttp.HttpCoreNIOSender
All Implemented Interfaces:
org.apache.axis2.engine.Handler, org.apache.axis2.transport.base.ManagementSupport, org.apache.axis2.transport.TransportSender
Direct Known Subclasses:
HttpCoreNIOSSLSender

public class HttpCoreNIOSender extends org.apache.axis2.handlers.AbstractHandler implements org.apache.axis2.transport.TransportSender, org.apache.axis2.transport.base.ManagementSupport
NIO transport sender for Axis2 based on HttpCore and NIO extensions
  • Constructor Details

    • HttpCoreNIOSender

      public HttpCoreNIOSender()
  • Method Details

    • initConnFactoryBuilder

      protected ClientConnFactoryBuilder initConnFactoryBuilder(org.apache.axis2.description.TransportOutDescription transportOut, org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • init

      public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportOutDescription transportOut) throws org.apache.axis2.AxisFault
      Initialize the transport sender, and execute reactor in new separate thread
      Specified by:
      init in interface org.apache.axis2.transport.TransportSender
      Parameters:
      cfgCtx - the Axis2 configuration context
      transportOut - the description of the http/s transport from Axis2 configuration
      Throws:
      org.apache.axis2.AxisFault - thrown on an error
    • invoke

      public org.apache.axis2.engine.Handler.InvocationResponse invoke(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault
      transport sender invocation from Axis2 core
      Specified by:
      invoke in interface org.apache.axis2.engine.Handler
      Parameters:
      msgContext - message to be sent
      Returns:
      the invocation response (always InvocationResponse.CONTINUE)
      Throws:
      org.apache.axis2.AxisFault - on error
    • cleanup

      public void cleanup(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault
      Specified by:
      cleanup in interface org.apache.axis2.transport.TransportSender
      Throws:
      org.apache.axis2.AxisFault
    • stop

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

      public void pause() throws org.apache.axis2.AxisFault
      Specified by:
      pause in interface org.apache.axis2.transport.base.ManagementSupport
      Throws:
      org.apache.axis2.AxisFault
    • resume

      public void resume() throws org.apache.axis2.AxisFault
      Specified by:
      resume in interface org.apache.axis2.transport.base.ManagementSupport
      Throws:
      org.apache.axis2.AxisFault
    • maintenenceShutdown

      public void maintenenceShutdown(long millis) throws org.apache.axis2.AxisFault
      Specified by:
      maintenenceShutdown in interface org.apache.axis2.transport.base.ManagementSupport
      Throws:
      org.apache.axis2.AxisFault
    • getActiveThreadCount

      public int getActiveThreadCount()
      Returns the number of active threads processing messages
      Specified by:
      getActiveThreadCount in interface org.apache.axis2.transport.base.ManagementSupport
      Returns:
      number of active threads processing messages
    • getQueueSize

      public int getQueueSize()
      Returns the number of requestes queued in the thread pool
      Specified by:
      getQueueSize in interface org.apache.axis2.transport.base.ManagementSupport
      Returns:
      queue size
    • getMessagesReceived

      public long getMessagesReceived()
      Specified by:
      getMessagesReceived in interface org.apache.axis2.transport.base.ManagementSupport
    • getFaultsReceiving

      public long getFaultsReceiving()
      Specified by:
      getFaultsReceiving in interface org.apache.axis2.transport.base.ManagementSupport
    • getBytesReceived

      public long getBytesReceived()
      Specified by:
      getBytesReceived in interface org.apache.axis2.transport.base.ManagementSupport
    • getMessagesSent

      public long getMessagesSent()
      Specified by:
      getMessagesSent in interface org.apache.axis2.transport.base.ManagementSupport
    • getFaultsSending

      public long getFaultsSending()
      Specified by:
      getFaultsSending in interface org.apache.axis2.transport.base.ManagementSupport
    • getBytesSent

      public long getBytesSent()
      Specified by:
      getBytesSent in interface org.apache.axis2.transport.base.ManagementSupport
    • getTimeoutsReceiving

      public long getTimeoutsReceiving()
      Specified by:
      getTimeoutsReceiving in interface org.apache.axis2.transport.base.ManagementSupport
    • getTimeoutsSending

      public long getTimeoutsSending()
      Specified by:
      getTimeoutsSending in interface org.apache.axis2.transport.base.ManagementSupport
    • getMinSizeReceived

      public long getMinSizeReceived()
      Specified by:
      getMinSizeReceived in interface org.apache.axis2.transport.base.ManagementSupport
    • getMaxSizeReceived

      public long getMaxSizeReceived()
      Specified by:
      getMaxSizeReceived in interface org.apache.axis2.transport.base.ManagementSupport
    • getAvgSizeReceived

      public double getAvgSizeReceived()
      Specified by:
      getAvgSizeReceived in interface org.apache.axis2.transport.base.ManagementSupport
    • getMinSizeSent

      public long getMinSizeSent()
      Specified by:
      getMinSizeSent in interface org.apache.axis2.transport.base.ManagementSupport
    • getMaxSizeSent

      public long getMaxSizeSent()
      Specified by:
      getMaxSizeSent in interface org.apache.axis2.transport.base.ManagementSupport
    • getAvgSizeSent

      public double getAvgSizeSent()
      Specified by:
      getAvgSizeSent in interface org.apache.axis2.transport.base.ManagementSupport
    • getResponseCodeTable

      public Map getResponseCodeTable()
      Specified by:
      getResponseCodeTable in interface org.apache.axis2.transport.base.ManagementSupport
    • resetStatistics

      public void resetStatistics()
      Specified by:
      resetStatistics in interface org.apache.axis2.transport.base.ManagementSupport
    • getLastResetTime

      public long getLastResetTime()
      Specified by:
      getLastResetTime in interface org.apache.axis2.transport.base.ManagementSupport
    • getMetricsWindow

      public long getMetricsWindow()
      Specified by:
      getMetricsWindow in interface org.apache.axis2.transport.base.ManagementSupport
    • reload

      public void reload(org.apache.axis2.description.TransportOutDescription transportOut) throws org.apache.axis2.AxisFault
      Reload SSL configurations and reset all connections
      Parameters:
      transportOut - TransportOutDescriptin of the configuration
      Throws:
      org.apache.axis2.AxisFault