Class XMPPListener

  • All Implemented Interfaces:
    org.apache.axis2.kernel.TransportListener

    public class XMPPListener
    extends Object
    implements org.apache.axis2.kernel.TransportListener
    • Field Summary

      • Fields inherited from interface org.apache.axis2.kernel.TransportListener

        HOST_ADDRESS, PARAM_PORT
    • Constructor Summary

      Constructors 
      Constructor Description
      XMPPListener()  
    • Constructor Detail

      • XMPPListener

        public XMPPListener()
    • Method Detail

      • init

        public void init​(org.apache.axis2.context.ConfigurationContext configurationCtx,
                         org.apache.axis2.description.TransportInDescription transportIn)
                  throws org.apache.axis2.AxisFault
        Initializing the XMPPListener. Retrieve connection details provided in xmpp transport receiver, connect to those servers & start listening in for messages.
        Specified by:
        init in interface org.apache.axis2.kernel.TransportListener
        Throws:
        org.apache.axis2.AxisFault
      • stop

        public void stop()
        Stop XMPP listener & disconnect from all XMPP Servers
        Specified by:
        stop in interface org.apache.axis2.kernel.TransportListener
      • getEPRForService

        public org.apache.axis2.addressing.EndpointReference getEPRForService​(String serviceName,
                                                                              String ip)
                                                                       throws org.apache.axis2.AxisFault
        Returns Default EPR for a given Service name & IP
        Parameters:
        serviceName -
        ip -
        Throws:
        org.apache.axis2.AxisFault
      • getEPRsForService

        public org.apache.axis2.addressing.EndpointReference[] getEPRsForService​(String serviceName,
                                                                                 String ip)
                                                                          throws org.apache.axis2.AxisFault
        Returns all EPRs for a given Service name & IP
        Specified by:
        getEPRsForService in interface org.apache.axis2.kernel.TransportListener
        Parameters:
        serviceName -
        ip -
        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.kernel.TransportListener
      • destroy

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

        public void start()
                   throws org.apache.axis2.AxisFault
        Start a pool of Workers. For each connection in connectionFactories, assign a packer listener. This packet listener will trigger when a message arrives.
        Specified by:
        start in interface org.apache.axis2.kernel.TransportListener
        Throws:
        org.apache.axis2.AxisFault