kaos.notification.im
Class JabberClient

java.lang.Object
  extended by kaos.notification.im.JabberClient
All Implemented Interfaces:
JabberListenerProvider

public class JabberClient
extends java.lang.Object
implements JabberListenerProvider


Field Summary
static java.lang.String PRESENCE_AVAILABLE
           
static java.lang.String PRESENCE_UNAVAILABLE
           
 
Constructor Summary
JabberClient()
           
JabberClient(java.lang.String userName, java.lang.String userPwd, java.lang.String imHostAddress, int imHostPort)
           
 
Method Summary
 java.lang.String checkPresence(java.lang.String jid)
           
 void connect(java.lang.String userName, java.lang.String hostAddr, java.lang.String userPass, int hostPort)
           
 void disconnect()
           
 JabberMessageListener getBrowseListener()
           
 JabberMessageListener getChatListener()
           
 ConnectionListener getConnectionListener()
           
 JabberMessageListener getErrorListener()
           
 JabberMessageListener getPresenceListener()
           
 JabberMessageListener getRequestListener()
           
 JabberMessageListener getRosterListener()
           
 JabberMessageListener getStatusListener()
           
 void logMessage(java.lang.String message, int indentLevel)
          Utility for writing terminal messages.
 void send(java.lang.String to, java.lang.String subject, java.lang.String message, java.lang.String type)
           
 void send(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String message, java.lang.String type)
          "send" method to send the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRESENCE_AVAILABLE

public static final java.lang.String PRESENCE_AVAILABLE

PRESENCE_UNAVAILABLE

public static final java.lang.String PRESENCE_UNAVAILABLE
Constructor Detail

JabberClient

public JabberClient()
             throws java.net.UnknownHostException,
                    ConnectionFailedException,
                    SendMessageFailedException
Throws:
java.net.UnknownHostException
ConnectionFailedException
SendMessageFailedException

JabberClient

public JabberClient(java.lang.String userName,
                    java.lang.String userPwd,
                    java.lang.String imHostAddress,
                    int imHostPort)
             throws java.net.UnknownHostException,
                    ConnectionFailedException,
                    SendMessageFailedException
Throws:
java.net.UnknownHostException
ConnectionFailedException
SendMessageFailedException
Method Detail

connect

public void connect(java.lang.String userName,
                    java.lang.String hostAddr,
                    java.lang.String userPass,
                    int hostPort)
             throws java.net.UnknownHostException,
                    ConnectionFailedException,
                    SendMessageFailedException
Throws:
java.net.UnknownHostException
ConnectionFailedException
SendMessageFailedException

checkPresence

public java.lang.String checkPresence(java.lang.String jid)

send

public void send(java.lang.String to,
                 java.lang.String subject,
                 java.lang.String message,
                 java.lang.String type)

send

public void send(java.lang.String to,
                 java.lang.String from,
                 java.lang.String subject,
                 java.lang.String message,
                 java.lang.String type)
"send" method to send the message.


disconnect

public void disconnect()

logMessage

public void logMessage(java.lang.String message,
                       int indentLevel)
Utility for writing terminal messages. Identifies the agent writing the message. Synchronized to prevent interleaving of messages.

Parameters:
message -
indentLevel -

getConnectionListener

public ConnectionListener getConnectionListener()
Specified by:
getConnectionListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getConnectionListener()

getErrorListener

public JabberMessageListener getErrorListener()
Specified by:
getErrorListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getErrorListener()

getStatusListener

public JabberMessageListener getStatusListener()
Specified by:
getStatusListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getStatusListener()

getRequestListener

public JabberMessageListener getRequestListener()
Specified by:
getRequestListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getRequestListener()

getRosterListener

public JabberMessageListener getRosterListener()
Specified by:
getRosterListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getRosterListener()

getPresenceListener

public JabberMessageListener getPresenceListener()
Specified by:
getPresenceListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getPresenceListener()

getBrowseListener

public JabberMessageListener getBrowseListener()
Specified by:
getBrowseListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getBrowseListener()

getChatListener

public JabberMessageListener getChatListener()
Specified by:
getChatListener in interface JabberListenerProvider
See Also:
hyres.notify.JabberListenerProvider#getChatListener()