Class XmppConnectionBean

java.lang.Object
edu.internet2.middleware.grouper.xmpp.XmppConnectionBean

public class XmppConnectionBean extends Object
represents a connection to an XMPP server. There is one connection per server/port/user/resource
  • Constructor Details

    • XmppConnectionBean

      public XmppConnectionBean()
      default constructor
    • XmppConnectionBean

      public XmppConnectionBean(String theResource)
      constructor with default everything and different resource
      Parameters:
      theResource -
    • XmppConnectionBean

      public XmppConnectionBean(String theServer, int thePort, String theUser, String theResource, String thePass)
      constructor with different stuff than the default
      Parameters:
      theServer -
      thePort -
      theUser -
      theResource -
      thePass -
  • Method Details

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • sendMessage

      public void sendMessage(String jabberIds, String payload)
      get a chat for a jabber id. Note this doesnt listen on the channel
      Parameters:
      jabberIds -
      payload - of the message
    • xmppConnection

      public org.jivesoftware.smack.XMPPConnection xmppConnection()
      get a connection object
      Returns:
      the connection object
    • xmppPass

      public String xmppPass()
      xmpp pass (decrypted if file)
      Returns:
      the pass
    • xmppPort

      public int xmppPort()
      port to connect to, or 1522 as default
      Returns:
      port
    • xmppResource

      public String xmppResource()
      xmpp resource
      Returns:
      the resource
    • xmppServer

      public String xmppServer()
      xpp server to connect to
      Returns:
      xmpp server
    • xmppUser

      public String xmppUser()
      xmpp user
      Returns:
      the user
    • chat

      public org.jivesoftware.smack.Chat chat(String jabberId, org.jivesoftware.smack.MessageListener messageListener)
      get or make a chat
      Parameters:
      jabberId - to chat with
      messageListener - to get callbacks on messages or null to just send. Note if there is already one registered, this one wont be used
      Returns:
      the chat