| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--i3mclient.communication.Communication
Encapsulated interface to fit concept name. Communication is created as a Singleton Pattern.
| Nested Class Summary | |
 class | 
Communication.AsynchronCallItem
One item of the asynchron call lists.  | 
| Field Summary | |
static int | 
ADDBUDDY
 | 
static int | 
CHANGEBUDDYGROUP
 | 
static int | 
CREATEACCOUNT
 | 
static int | 
CREATECONFERENCE
 | 
static int | 
DELETEACCOUNT
 | 
static int | 
FINDUSERS
 | 
static int | 
GETBUDDYLIST
 | 
static int | 
GETCHATLIST
 | 
static int | 
GETDAILYCOMIC
 | 
static int | 
GETDISCUSSIONMEMBERS
 | 
static int | 
GETMESSAGES
 | 
static int | 
GETOFFLINEMESSAGES
 | 
static int | 
GETPUBLICKEY
 | 
static int | 
GETUSERDATA
 | 
static int | 
GETVERSION
 | 
static int | 
INVITEUSER
 | 
static int | 
JOINCHAT
 | 
static int | 
LEAVEDISCUSSION
 | 
static int | 
LOGINACCOUNT
 | 
static int | 
LOGOUTACCOUNT
 | 
static int | 
REMOVEBUDDY
 | 
static int | 
SEARCHWEB
 | 
static int | 
SENDFAX
 | 
static int | 
SENDMESSAGE
 | 
static int | 
SETSTATUS
 | 
static int | 
SETUSERDATA
 | 
static int | 
TRANSLATE
 | 
| Constructor Summary | |
Communication()
Constructor.  | 
|
| Method Summary | |
 void | 
addBuddy(long userID,
         String group)
Add a buddy to the buddy list of the current logged in user.  | 
 void | 
addBuddyAsynchron(long userID,
                  String group,
                  SMAddBuddyListener listener,
                  boolean swtThreadRequired)
Add a buddy to the buddy list of the current logged in user (asynchron).  | 
 void | 
addErrorListener(ErrorListener listener)
Add a listener for all errors.  | 
 void | 
changeBuddyGroup(long userID,
                 String group)
Change the group of a buddy in the buddy list.  | 
 void | 
changeBuddyGroupAsynchron(long userID,
                          String group,
                          SMChangeBuddyGroupListener listener,
                          boolean swtThreadRequired)
Change the group of a buddy in the buddy list (asynchron).  | 
 long | 
createAccount(String nick,
              byte[] password)
Create an account on I3M-server.  | 
 void | 
createAccountAsynchron(String nick,
                       byte[] password,
                       SMCreateAccountListener listener,
                       boolean swtThreadRequired)
Create an account on I3M-server (asynchron).  | 
 long | 
createConference(long userID)
Create an new conference on I3M-server.  | 
 void | 
createConference(long userID,
                 SMCreateConferenceListener listener,
                 boolean swtThreadRequired)
Create an new conference on I3M-server (asynchron).  | 
 void | 
deleteAccount()
Delete the current logged in account from I3M-server.  | 
 void | 
deleteAccountAsynchron(SMDeleteAccountListener listener,
                       boolean swtThreadRequired)
Delete the current logged in account from I3M-server (asynchron).  | 
 UserData[] | 
findUsers(UserData userData,
          boolean fuzzy)
Search for users in I3M-network.  | 
 void | 
findUsersAsynchron(UserData userData,
                   boolean fuzzy,
                   SMFindUsersListener listener,
                   boolean swtThreadRequired)
Search for users in I3M-network (asynchron).  | 
 BuddyData[] | 
getBuddyList()
Returns the buddy list of the current logged in user.  | 
 void | 
getBuddyListAsynchron(SMGetBuddyListListener listener,
                      boolean swtThreadRequired)
Returns the buddy list of the current logged in user (asynchron).  | 
 DiscussionData[] | 
getChatList()
Get a list with all available chats.  | 
 void | 
getChatListAsynchron(SMGetChatListListener listener,
                     boolean swtThreadRequired)
Get a list with all available chats (asynchron).  | 
 byte[] | 
getDailyComic()
Get a daily comic for the current logged in user (only once one day).  | 
 void | 
getDailyComicAsynchron(SMGetDailyComicListener listener,
                       boolean swtThreadRequired)
Get a daily comic for the current logged in user (only once one day) (asynchron).  | 
 BuddyData[] | 
getDiscussionMembers(long discussionID)
Retrieve all discussion members of a chat or conference.  | 
 void | 
getDiscussionMembersAsynchron(long discussionID,
                              SMGetDiscussionMembersListener listener,
                              boolean swtThreadRequired)
Retrieve all discussion members of a chat or conference (asynchron).  | 
static Communication | 
getInstance()
Returns an instance of this class (singleton construction)  | 
 MessageData[] | 
getMessages()
Get all new messages of the current logged in user.  | 
 void | 
getMessagesAsynchron(SMGetMessagesListener listener,
                     boolean swtThreadRequired)
Get all new messages of the current logged in user (asynchron).  | 
 MessageData[] | 
getOfflineMessages()
Get all offline message of the current logged in user.  | 
 void | 
getOfflineMessagesAsynchron(SMGetOfflineMessagesListener listener,
                            boolean swtThreadRequired)
Get all offline message of the current logged in user (asynchron).  | 
 PublicKey | 
getPublicKey()
Get the current sessionID and public key from I3M-server.  | 
 void | 
getPublicKeyAsynchron(SMTranslateListener listener,
                      boolean swtThreadRequired)
Get the current sessionID and public key from I3M-server (asynchron).  | 
 UserData | 
getUserData(long userID)
Retrieve the userData of an user.  | 
 void | 
getUserDataAsynchron(long userID,
                     SMGetUserDataListener listener,
                     boolean swtThreadRequired)
Retrieve the userData of an user (asynchron).  | 
 String | 
getVersion(String version)
Returns the latest version of I3M.  | 
 void | 
getVersionAsynchron(String version,
                    SMGetVersionListener listener,
                    boolean swtThreadRequired)
Returns the latest version of I3M (asynchron).  | 
 void | 
informListener(Communication.AsynchronCallItem currentItem)
Inform all listener of asynchron calls.  | 
 void | 
inviteUser(long discussionID,
           long userID)
Invite a user to a chat or conference.  | 
 void | 
inviteUserAsynchron(long discussionID,
                    long userID,
                    SMInviteUserListener listener,
                    boolean swtThreadRequired)
Invite a user to a chat or conference (asynchron).  | 
 void | 
joinChat(long discussionID)
Joins the current logged in user to a chat.  | 
 void | 
joinChatAsynchron(long discussionID,
                  SMJoinChatListener listener,
                  boolean swtThreadRequired)
Joins the current logged in user to a chat (asynchron).  | 
 void | 
leaveDiscussion(long discussionID,
                int type)
The current logged in user want to leave a chat or conference.  | 
 void | 
leaveDiscussionAsynchron(long discussionID,
                         int type,
                         SMLeaveDiscussionListener listener,
                         boolean swtThreadRequired)
The current logged in user want to leave a chat or conference (asynchron).  | 
 void | 
loginAccount(long userID,
             byte[] password)
Login an account on I3M-server.  | 
 void | 
loginAccountAsynchron(long userID,
                      byte[] password,
                      SMLoginAccountListener listener,
                      boolean swtThreadRequired)
Login an account on I3M-server (asynchron).  | 
 void | 
logoutAccount()
Logout an account on I3M-server (go offline).  | 
 void | 
logoutAccountAsynchron(SMLogoutAccountListener listener,
                       boolean swtThreadRequired)
Logout an account on I3M-server (go offline) (asynchron).  | 
 void | 
removeBuddy(long userID)
Remove a buddy from the buddy list of the current logged in user.  | 
 void | 
removeBuddyAsynchron(long userID,
                     SMRemoveBuddyListener listener,
                     boolean swtThreadRequired)
Remove a buddy from the buddy list of the current logged in user (asynchron).  | 
 void | 
removeErrorListener(ErrorListener listener)
Remove a listener for all errors.  | 
 void | 
run()
 | 
 WebSearchResult[] | 
searchWeb(String query)
Search in the web by keywords.  | 
 void | 
searchWebAsynchron(String query,
                   SMSearchWebListener listener,
                   boolean swtThreadRequired)
Search in the web by keywords (asynchron).  | 
 void | 
sendFax(String faxNo,
        String text)
Send a fax to a fax number.  | 
 void | 
sendFaxAsynchron(String faxNo,
                 String text,
                 SMSendFaxListener listener,
                 boolean swtThreadRequired)
Send a fax to a fax number (asynchron).  | 
 void | 
sendMessage(MessageData messageData)
Send a message to an other user.  | 
 void | 
sendMessageAsynchron(MessageData messageData,
                     SMSendMessageListener listener,
                     boolean swtThreadRequired)
Send a message to an other user (asynchron).  | 
 void | 
setStatus(int status)
Set the status of the current logged in user.  | 
 void | 
setStatusAsynchron(int status,
                   SMSetStatusListener listener,
                   boolean swtThreadRequired)
Set the status of the current logged in user (asynchron).  | 
 void | 
setUserData(UserData userData)
Set the userdata of the current logged in user.  | 
 void | 
setUserDataAsynchron(UserData userData,
                     SMSetUserDataListener listener,
                     boolean swtThreadRequired)
Set the userdata of the current logged in user (asynchron).  | 
 String | 
translate(String fromLanguage,
          String toLanguage,
          String text)
Translate a string via extern web service.  | 
 void | 
translateAsynchron(String fromLanguage,
                   String toLanguage,
                   String text,
                   SMTranslateListener listener,
                   boolean swtThreadRequired)
Translate a string via extern web service (asychron).  | 
| Methods inherited from class java.lang.Object | 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final int ADDBUDDY
public static final int CHANGEBUDDYGROUP
public static final int CREATEACCOUNT
public static final int CREATECONFERENCE
public static final int DELETEACCOUNT
public static final int FINDUSERS
public static final int GETBUDDYLIST
public static final int GETCHATLIST
public static final int GETDAILYCOMIC
public static final int GETDISCUSSIONMEMBERS
public static final int GETMESSAGES
public static final int GETOFFLINEMESSAGES
public static final int GETUSERDATA
public static final int GETVERSION
public static final int INVITEUSER
public static final int JOINCHAT
public static final int LEAVEDISCUSSION
public static final int LOGINACCOUNT
public static final int LOGOUTACCOUNT
public static final int REMOVEBUDDY
public static final int SEARCHWEB
public static final int SENDFAX
public static final int SENDMESSAGE
public static final int SETSTATUS
public static final int SETUSERDATA
public static final int TRANSLATE
public static final int GETPUBLICKEY
| Constructor Detail | 
public Communication()
| Method Detail | 
public static Communication getInstance()
public long createAccount(String nick,
                          byte[] password)
                   throws I3MServerException
nick - The nick of new userpassword - The password of new user
I3MServerException - Error from webservice
public void createAccountAsynchron(String nick,
                                   byte[] password,
                                   SMCreateAccountListener listener,
                                   boolean swtThreadRequired)
nick - The nick of new userpassword - The password of new userlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void loginAccount(long userID,
                         byte[] password)
                  throws I3MServerException
userID - The userID of userpassword - The password of user (encrypted with RSA)
I3MServerException - Error from webservice
public void loginAccountAsynchron(long userID,
                                  byte[] password,
                                  SMLoginAccountListener listener,
                                  boolean swtThreadRequired)
userID - The userID of userpassword - The password of user (encrypted with RSA)listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void logoutAccount()
                   throws I3MServerException
I3MServerException - Error from webservice
public void logoutAccountAsynchron(SMLogoutAccountListener listener,
                                   boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public UserData getUserData(long userID)
                     throws I3MServerException
userID - Get the UserData of a user with this userID
I3MServerException - Error from webservice
public void getUserDataAsynchron(long userID,
                                 SMGetUserDataListener listener,
                                 boolean swtThreadRequired)
userID - Get the UserData of a user with this userIDlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void setUserData(UserData userData)
                 throws I3MServerException
userData - The new UserData.
I3MServerException - Error from webservice
public void setUserDataAsynchron(UserData userData,
                                 SMSetUserDataListener listener,
                                 boolean swtThreadRequired)
userData - The new UserData.listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void deleteAccount()
                   throws I3MServerException
I3MServerException - Error from webservice
public void deleteAccountAsynchron(SMDeleteAccountListener listener,
                                   boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public BuddyData[] getBuddyList()
                         throws I3MServerException
I3MServerException - Error from webservice
public void getBuddyListAsynchron(SMGetBuddyListListener listener,
                                  boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void addBuddy(long userID,
                     String group)
              throws I3MServerException
userID - The userID of the user which should be added to the buddy listgroup - The new buddy should appear in this group
I3MServerException - Error from webservice
public void addBuddyAsynchron(long userID,
                              String group,
                              SMAddBuddyListener listener,
                              boolean swtThreadRequired)
userID - The userID of the user which should be added to the buddy listgroup - The new buddy should appear in this grouplistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void changeBuddyGroup(long userID,
                             String group)
                      throws I3MServerException
userID - The userID of the buddy which should be moved in an other groupgroup - The name of the new group
I3MServerException - Error from webservice
public void changeBuddyGroupAsynchron(long userID,
                                      String group,
                                      SMChangeBuddyGroupListener listener,
                                      boolean swtThreadRequired)
userID - The userID of the buddy which should be moved in an other groupgroup - The name of the new grouplistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void removeBuddy(long userID)
                 throws I3MServerException
userID - The user with this userID will be removed
I3MServerException - Error from webservice
public void removeBuddyAsynchron(long userID,
                                 SMRemoveBuddyListener listener,
                                 boolean swtThreadRequired)
userID - The user with this userID will be removedlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void setStatus(int status)
               throws I3MServerException
status - The new status
I3MServerException - Error from webservice
public void setStatusAsynchron(int status,
                               SMSetStatusListener listener,
                               boolean swtThreadRequired)
status - The new statuslistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public MessageData[] getMessages()
                          throws I3MServerException
I3MServerException - Error from webservice
public void getMessagesAsynchron(SMGetMessagesListener listener,
                                 boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public MessageData[] getOfflineMessages()
                                 throws I3MServerException
I3MServerException - Error from webservice
public void getOfflineMessagesAsynchron(SMGetOfflineMessagesListener listener,
                                        boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void sendMessage(MessageData messageData)
                 throws I3MServerException
messageData - The message
I3MServerException - Error from webservice
public void sendMessageAsynchron(MessageData messageData,
                                 SMSendMessageListener listener,
                                 boolean swtThreadRequired)
messageData - The messagelistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public String getVersion(String version)
                  throws I3MServerException
version - The version of I3M-client
I3MServerException - Error from webservice
public void getVersionAsynchron(String version,
                                SMGetVersionListener listener,
                                boolean swtThreadRequired)
version - The version of I3M-clientlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public byte[] getDailyComic()
                     throws I3MServerException
I3MServerException - Error from webservice
public void getDailyComicAsynchron(SMGetDailyComicListener listener,
                                   boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public DiscussionData[] getChatList()
                             throws I3MServerException
I3MServerException - Error from webservice
public void getChatListAsynchron(SMGetChatListListener listener,
                                 boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void joinChat(long discussionID)
              throws I3MServerException
discussionID - The discussionID of the chat to join
I3MServerException - Error from webservice
public void joinChatAsynchron(long discussionID,
                              SMJoinChatListener listener,
                              boolean swtThreadRequired)
discussionID - The discussionID of the chat to joinlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public long createConference(long userID)
                      throws I3MServerException
userID - The userID of the user which will be with the current logged in user in the conference
I3MServerException - Error from webservice
public void createConference(long userID,
                             SMCreateConferenceListener listener,
                             boolean swtThreadRequired)
userID - The userID of the user which will be with the current logged in user in the conferencelistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void inviteUser(long discussionID,
                       long userID)
                throws I3MServerException
discussionID - The discussionID of the chat or conferenceuserID - The userID of the user which is invited
I3MServerException - Error from webservice
public void inviteUserAsynchron(long discussionID,
                                long userID,
                                SMInviteUserListener listener,
                                boolean swtThreadRequired)
discussionID - The discussionID of the chat or conferenceuserID - The userID of the user which is invitedlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public BuddyData[] getDiscussionMembers(long discussionID)
                                 throws I3MServerException
discussionID - The discussionID of the chat or conference
I3MServerException - Error from webservice
public void getDiscussionMembersAsynchron(long discussionID,
                                          SMGetDiscussionMembersListener listener,
                                          boolean swtThreadRequired)
discussionID - The discussionID of the chat or conferencelistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void leaveDiscussion(long discussionID,
                            int type)
                     throws I3MServerException
discussionID - The discussionID of the chat or conferencetype - The type of leaving (hide or leave)
I3MServerException - Error from webservice
public void leaveDiscussionAsynchron(long discussionID,
                                     int type,
                                     SMLeaveDiscussionListener listener,
                                     boolean swtThreadRequired)
discussionID - The discussionID of the chat or conferencetype - The type of leaving (hide or leave)listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public UserData[] findUsers(UserData userData,
                            boolean fuzzy)
                     throws I3MServerException
userData - UserData with the search query (empty fields means asterix)fuzzy - Only exact matches will be found
I3MServerException - Error from webservice
public void findUsersAsynchron(UserData userData,
                               boolean fuzzy,
                               SMFindUsersListener listener,
                               boolean swtThreadRequired)
userData - UserData with the search query (empty fields means asterix)fuzzy - Only exact matches will be foundlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public WebSearchResult[] searchWeb(String query)
                            throws I3MServerException
query - Search for this string
I3MServerException - Error from webservice
public void searchWebAsynchron(String query,
                               SMSearchWebListener listener,
                               boolean swtThreadRequired)
query - Search for this stringlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public void sendFax(String faxNo,
                    String text)
             throws I3MServerException
faxNo - The fax numbertext - The text to fax
I3MServerException - Error from webservice
public void sendFaxAsynchron(String faxNo,
                             String text,
                             SMSendFaxListener listener,
                             boolean swtThreadRequired)
faxNo - The fax numbertext - The text to faxlistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public String translate(String fromLanguage,
                        String toLanguage,
                        String text)
                 throws I3MServerException
fromLanguage - The language of the original text (short string)toLanguage - Translate the original text in this language (short string)text - The text to translate
I3MServerException - Error from webservice
public void translateAsynchron(String fromLanguage,
                               String toLanguage,
                               String text,
                               SMTranslateListener listener,
                               boolean swtThreadRequired)
fromLanguage - The language of the original text (short string)toLanguage - Translate the original text in this language (short string)text - The text to translatelistener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-thread
public PublicKey getPublicKey()
                       throws I3MServerException
I3MServerException - Error from webservice
public void getPublicKeyAsynchron(SMTranslateListener listener,
                                  boolean swtThreadRequired)
listener - The listener which will be informedswtThreadRequired - The listener will be informed in a SWT-threadpublic void addErrorListener(ErrorListener listener)
listener - The listener which will be informed about all errorspublic void removeErrorListener(ErrorListener listener)
listener - The listener which will no longer be informed about all errorspublic void run()
run in interface Runnablepublic void informListener(Communication.AsynchronCallItem currentItem)
currentItem - The current asynchron call
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||