net.sourceforge.jxa
Interface XmppListener

All Known Implementing Classes:
ProgramControl

public interface XmppListener

Interface class to implement events

Since:
1.0

Method Summary
 void onAuth()
          This event occurs when the login/authentication process succeeds.
 void onAuthFailed(java.lang.String message)
          This event occurs when the login/authentication process fails.
 void onConnFailed()
          This event is sent when a parser or connection error occurs.
 void onContactEvent(java.lang.String jid, java.lang.String name, java.lang.String group, java.lang.String subscription)
          This event occurs for each contact in roster when the roster is queried.
 void onContactRemoveEvent(java.lang.String jid)
          This event occurs when someone has removed you from his roster (o rly?)
 void onMessageEvent(java.lang.String from, java.lang.String body)
          This event is sent when a message arrives.
 void onStatusEvent(java.lang.String jid, java.lang.String show, java.lang.String status)
           This event occurs when a presence message comes from jabber server.
 void onSubscribeEvent(java.lang.String jid)
          This event is sent when a subscription request arrives.
 void onThinkEvent(java.lang.String thinktype, java.lang.String from, java.lang.String pic, java.lang.String thinkword, java.lang.String word1, java.lang.String word2, java.lang.String word3)
          This method handles messages exclusivly for ThinkAlike, the parametes can be null based on what type of thinktype message is sent.
 void onUnsubscribeEvent(java.lang.String jid)
          This event is sent when a subscription remove event arrives.
 

Method Detail

onConnFailed

void onConnFailed()
This event is sent when a parser or connection error occurs.


onAuth

void onAuth()
This event occurs when the login/authentication process succeeds.


onAuthFailed

void onAuthFailed(java.lang.String message)
This event occurs when the login/authentication process fails.

Parameters:
message - some error information

onMessageEvent

void onMessageEvent(java.lang.String from,
                    java.lang.String body)
This event is sent when a message arrives.

Parameters:
from - the jid of the sender
body - the message text

onContactRemoveEvent

void onContactRemoveEvent(java.lang.String jid)
This event occurs when someone has removed you from his roster (o rly?)

Parameters:
jid - the jid of the remover

onContactEvent

void onContactEvent(java.lang.String jid,
                    java.lang.String name,
                    java.lang.String group,
                    java.lang.String subscription)
This event occurs for each contact in roster when the roster is queried.

Parameters:
jid - the jid of the contact
name - the nickname of the contact
group - the group in which the contact is saved
subscription - the subscription status of the contact

onStatusEvent

void onStatusEvent(java.lang.String jid,
                   java.lang.String show,
                   java.lang.String status)

This event occurs when a presence message comes from jabber server. This can also be your own jid. The presence can be one of the following:

An offline user will send no status message at all.

Parameters:
show - .
jid - the JID of the contact that changed his status
status - the display status

onSubscribeEvent

void onSubscribeEvent(java.lang.String jid)
This event is sent when a subscription request arrives. This means someone has allowed you to see his status.

Parameters:
jid - the jid of the one who wants to subscribe to you

onUnsubscribeEvent

void onUnsubscribeEvent(java.lang.String jid)
This event is sent when a subscription remove event arrives. This means someone has taken away your right to see his status.

Parameters:
jid - the jid of the one who removes your subscription

onThinkEvent

void onThinkEvent(java.lang.String thinktype,
                  java.lang.String from,
                  java.lang.String pic,
                  java.lang.String thinkword,
                  java.lang.String word1,
                  java.lang.String word2,
                  java.lang.String word3)
This method handles messages exclusivly for ThinkAlike, the parametes can be null based on what type of thinktype message is sent.

Parameters:
thinktype - this described what type of message it is, to be handled by a swich method
from - the sender of the thinktype message
pic - the picture to be sent with the request, needs to be Base64 coded or something
thinkword - the acutal word that is assosiated with the pic from the requester
word1 - first suggested word
word2 - second suggested word
word3 - third suggested word