Class XMPPSender

  • All Implemented Interfaces:
    org.apache.axis2.engine.Handler, org.apache.axis2.kernel.TransportSender

    public class XMPPSender
    extends org.apache.axis2.handlers.AbstractHandler
    implements org.apache.axis2.kernel.TransportSender
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler

        org.apache.axis2.engine.Handler.InvocationResponse
    • Field Summary

      • Fields inherited from class org.apache.axis2.handlers.AbstractHandler

        handlerDesc
    • Constructor Summary

      Constructors 
      Constructor Description
      XMPPSender()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanup​(org.apache.axis2.context.MessageContext msgContext)  
      void init​(org.apache.axis2.context.ConfigurationContext confContext, org.apache.axis2.description.TransportOutDescription transportOut)
      Initialize the transport sender by reading pre-defined connection factories for outgoing messages.
      org.apache.axis2.engine.Handler.InvocationResponse invoke​(org.apache.axis2.context.MessageContext msgContext)  
      static void processChatMessage​(org.apache.axis2.context.MessageContext msgCtx)
      Process message requests that came in through chat clients
      void sendMessage​(org.apache.axis2.context.MessageContext msgCtx, String targetAddress, org.apache.axis2.kernel.OutTransportInfo outTransportInfo)
      Send the given message over XMPP transport
      void stop()  
      • Methods inherited from class org.apache.axis2.handlers.AbstractHandler

        flowComplete, getHandlerDesc, getName, getParameter, init, toString
      • Methods inherited from interface org.apache.axis2.engine.Handler

        flowComplete, getHandlerDesc, getName, getParameter, init
    • Constructor Detail

      • XMPPSender

        public XMPPSender()
    • Method Detail

      • 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
      • init

        public void init​(org.apache.axis2.context.ConfigurationContext confContext,
                         org.apache.axis2.description.TransportOutDescription transportOut)
                  throws org.apache.axis2.AxisFault
        Initialize the transport sender by reading pre-defined connection factories for outgoing messages. These will create sessions (one per each destination dealt with) to be used when messages are being sent.
        Specified by:
        init in interface org.apache.axis2.kernel.TransportSender
        Parameters:
        confContext - the configuration context
        transportOut - the transport sender definition from axis2.xml
        Throws:
        org.apache.axis2.AxisFault - on error
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.axis2.kernel.TransportSender
      • 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
      • sendMessage

        public void sendMessage​(org.apache.axis2.context.MessageContext msgCtx,
                                String targetAddress,
                                org.apache.axis2.kernel.OutTransportInfo outTransportInfo)
                         throws org.apache.axis2.AxisFault
        Send the given message over XMPP transport
        Parameters:
        msgCtx - the axis2 message context
        Throws:
        org.apache.axis2.AxisFault - on error
      • processChatMessage

        public static void processChatMessage​(org.apache.axis2.context.MessageContext msgCtx)
                                       throws org.apache.axis2.AxisFault
        Process message requests that came in through chat clients
        Parameters:
        msgCtx -
        Throws:
        org.apache.axis2.AxisFault