Class XMPPNotificationManager


  • public class XMPPNotificationManager
    extends java.lang.Object
    Singleton class used to send messages to an XMPP Server. Used by XMPPNotificationStragetgy and XMPPGroupNotificationStrategy
    Version:
    $Id: $
    Author:
    Jonathan Sartin, Benjamin Reed
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected XMPPNotificationManager()
      Constructor for XMPPNotificationManager.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static XMPPNotificationManager getInstance()
      get an instance of the XMPPNotificationManager
      boolean isLoggedIn()
      isLoggedIn
      boolean sendGroupChat​(java.lang.String xmppChatRoom, java.lang.String xmppMessage)
      send an xmpp message to a specified Chat Room.
      boolean sendMessage​(java.lang.String xmppTo, java.lang.String xmppMessage)
      sendMessage
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMPPNotificationManager

        protected XMPPNotificationManager()

        Constructor for XMPPNotificationManager.

    • Method Detail

      • getInstance

        public static XMPPNotificationManager getInstance()
        get an instance of the XMPPNotificationManager
        Returns:
        instance of XMPPNotificationManager
      • isLoggedIn

        public boolean isLoggedIn()

        isLoggedIn

        Returns:
        a boolean.
      • sendMessage

        public boolean sendMessage​(java.lang.String xmppTo,
                                   java.lang.String xmppMessage)

        sendMessage

        Parameters:
        xmppTo - a String object.
        xmppMessage - a String object.
        Returns:
        a boolean.
      • sendGroupChat

        public boolean sendGroupChat​(java.lang.String xmppChatRoom,
                                     java.lang.String xmppMessage)
        send an xmpp message to a specified Chat Room.
        Parameters:
        xmppChatRoom - room to send message to.
        xmppMessage - text to be sent in the body of the message
        Returns:
        true if message is sent, false otherwise