Class AbstractTransportListener

  • All Implemented Interfaces:
    org.apache.axis2.transport.base.ManagementSupport, org.apache.axis2.transport.TransportListener

    public abstract class AbstractTransportListener
    extends Object
    implements org.apache.axis2.transport.TransportListener, org.apache.axis2.transport.base.ManagementSupport
    This class will provide basic functionality to write http and https listeners for WSO2 projects.
    • Field Detail

      • configurationContext

        protected org.apache.axis2.context.ConfigurationContext configurationContext
      • port

        protected int port
      • proxyPort

        protected int proxyPort
    • Constructor Detail

      • AbstractTransportListener

        public AbstractTransportListener()
    • Method Detail

      • init

        public void init​(org.apache.axis2.context.ConfigurationContext configContext,
                         org.apache.axis2.description.TransportInDescription transportIn)
                  throws org.apache.axis2.AxisFault
        Specified by:
        init in interface org.apache.axis2.transport.TransportListener
        Throws:
        org.apache.axis2.AxisFault
      • start

        public void start()
                   throws org.apache.axis2.AxisFault
        Specified by:
        start in interface org.apache.axis2.transport.TransportListener
        Throws:
        org.apache.axis2.AxisFault
      • stop

        public void stop()
                  throws org.apache.axis2.AxisFault
        Specified by:
        stop in interface org.apache.axis2.transport.TransportListener
        Throws:
        org.apache.axis2.AxisFault
      • getEPR

        public org.apache.axis2.addressing.EndpointReference getEPR​(String protocol,
                                                                    String serviceName,
                                                                    String ip)
                                                             throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • getSessionContext

        public org.apache.axis2.context.SessionContext getSessionContext​(org.apache.axis2.context.MessageContext messageContext)
        Specified by:
        getSessionContext in interface org.apache.axis2.transport.TransportListener
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.apache.axis2.transport.TransportListener
      • genEpr

        protected org.apache.axis2.addressing.EndpointReference genEpr​(String protocol,
                                                                       String ip,
                                                                       String serviceContextPath,
                                                                       String serviceName)
                                                                throws org.apache.axis2.AxisFault
        Returns the endpoint reference for a service.
        Parameters:
        protocol - The protocol used eg: http
        ip - The IP for the service
        serviceContextPath - The context path
        serviceName - The name of the service
        Returns:
        The end point reference
        Throws:
        org.apache.axis2.AxisFault - Thrown in case of a socket exception
      • 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 l)
                                 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()
        Specified by:
        getActiveThreadCount in interface org.apache.axis2.transport.base.ManagementSupport
      • getQueueSize

        public int getQueueSize()
        Specified by:
        getQueueSize in interface org.apache.axis2.transport.base.ManagementSupport
      • 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