Class AbstractTransportListener

    • Field Detail

      • log

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

        protected int state
        state of the listener
      • isNonBlocking

        protected boolean isNonBlocking
        is this transport non-blocking?
      • workerPool

        protected WorkerPool workerPool
        the thread pool to execute actual poll invocations
      • useAxis2ThreadPool

        protected boolean useAxis2ThreadPool
        use the thread pool available in the axis2 configuration context
      • metrics

        protected MetricsCollector metrics
        Metrics collector for this transport
    • Constructor Detail

      • AbstractTransportListener

        protected AbstractTransportListener()
        A constructor that makes subclasses pick up the correct logger
    • Method Detail

      • init

        public void init​(ConfigurationContext cfgCtx,
                         TransportInDescription transportIn)
                  throws AxisFault
        Initialize the generic transport. Sets up the transport and the thread pool to be used for message processing. Also creates an AxisObserver that gets notified of service life cycle events for the transport to act on
        Specified by:
        init in interface TransportListener
        Parameters:
        cfgCtx - the axis configuration context
        transportIn - the transport-in description
        Throws:
        AxisFault - on error
      • disableTransportForService

        public void disableTransportForService​(AxisService service)
      • stopListeningForService

        protected abstract void stopListeningForService​(AxisService service)
      • getEPRForService

        public EndpointReference getEPRForService​(String serviceName,
                                                  String ip)
                                           throws AxisFault
        This is a deprecated method in Axis2 and this default implementation returns the first result from the getEPRsForService() method
        Throws:
        AxisFault
      • getSessionContext

        public SessionContext getSessionContext​(MessageContext messageContext)
        Description copied from interface: TransportListener
        To get the sessionContext transport dependent manner. So that transport listener can return its own implementation of session managment
        Specified by:
        getSessionContext in interface TransportListener
        Parameters:
        messageContext - : MessageContext which has all the relavent data
        Returns:
        SessionContext
      • createMessageContext

        public MessageContext createMessageContext()
        Create a new axis MessageContext for an incoming message through this transport
        Returns:
        the newly created message context
      • handleIncomingMessage

        public void handleIncomingMessage​(MessageContext msgCtx,
                                          Map trpHeaders,
                                          String soapAction,
                                          String contentType)
                                   throws AxisFault
        Process a new incoming message 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
        Throws:
        AxisFault
      • getTransportName

        public String getTransportName()
      • pause

        public void pause()
                   throws AxisFault
        Pause the listener - Stop accepting/processing new messages, but continues processing existing messages until they complete. This helps bring an instance into a maintenence mode
        Throws:
        AxisFault - on error
      • resume

        public void resume()
                    throws AxisFault
        Resume the lister - Brings the lister into active mode back from a paused state
        Throws:
        AxisFault - on error
      • maintenenceShutdown

        public void maintenenceShutdown​(long millis)
                                 throws AxisFault
        Stop processing new messages, and wait the specified maximum time for in-flight requests to complete before a controlled shutdown for maintenence
        Parameters:
        millis - a number of milliseconds to wait until pending requests are allowed to complete
        Throws:
        AxisFault - on error
      • 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()