|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.xmpp.connection.impl.XMPPSessionImpl
public class XMPPSessionImpl
Created by The eXo Platform SAS.
| Constructor Summary | |
|---|---|
protected |
XMPPSessionImpl(java.lang.String username,
java.lang.String password,
UserInfoService organization,
org.exoplatform.ws.frameworks.cometd.transport.ContinuationServiceDelegate delegate,
HistoryImpl history,
java.util.ResourceBundle rb)
|
| Method Summary | |
|---|---|
void |
addBuddy(java.lang.String username,
java.lang.String nickname,
java.lang.String group)
Add new buddy to roster. |
boolean |
addTransport(Transport transport,
java.lang.String remoteUser,
java.lang.String remotePassword,
boolean autoLogin)
Check is Transport supported and add it to List
of available transports. |
void |
askForSubscription(java.lang.String username,
java.lang.String nickname)
Ask for subscription to user with given name. |
void |
banUser(java.lang.String room,
java.lang.String nickname,
java.lang.String reason)
|
void |
changeAvailabilityStatusInRoom(java.lang.String room,
java.lang.String status,
java.lang.String mode)
Change status in the room (e.g Extend Away). |
void |
changeNickname(java.lang.String room,
java.lang.String nickname)
Change nickname in the room. |
void |
changeSubject(java.lang.String room,
java.lang.String newSubject)
Change subject of the room. |
boolean |
cleanBuddiesList()
Clean buddies list. |
void |
close()
Close current connection and send notification to buddies. |
org.jivesoftware.smackx.muc.MultiUserChat |
configRoom(java.lang.String room,
ConfigRoomBean cr)
Configure the group chat. |
void |
createGroup(java.lang.String grop)
|
FormBean |
createRoom(java.lang.String room,
java.lang.String nickname)
Create new group chat. |
void |
declineRoom(java.lang.String room,
java.lang.String inviter,
java.lang.String reason)
Decline the invitation to the room. |
java.lang.Boolean |
destroyRoom(java.lang.String room,
java.lang.String reason,
java.lang.String altRoom)
Destroy the group chat. |
java.util.List<HistoricalMessage> |
getAllHistory(java.lang.String usernameto,
java.lang.String usernamefrom,
boolean isGroupChat)
Get history. |
java.util.List<org.jivesoftware.smack.packet.Presence> |
getBuddiesPresense()
Get list of Presence for all buddies for current user. |
org.jivesoftware.smack.RosterEntry |
getBuddy(java.lang.String name)
Return the roster entry by the name of user. |
FormBean |
getConfigFormRoom(java.lang.String room)
get configuration form for group chat. |
org.jivesoftware.smack.XMPPConnection |
getConnection()
|
org.jivesoftware.smackx.filetransfer.FileTransferRequest |
getFileTransferRequest(java.lang.String uuid)
|
java.util.List<HistoricalMessage> |
getHistoryBetweenDate(java.lang.String usernameto,
java.lang.String usernamefrom,
boolean isGroupChat,
java.util.Date dateFrom,
java.util.Date dateTo)
Get history between two date. |
java.util.List<HistoricalMessage> |
getHistoryFromDateToNow(java.lang.String usernameto,
java.lang.String usernamefrom,
boolean isGroupChat,
java.util.Date dateFrom)
Get history between the date and current time. |
java.util.List<Interlocutor> |
getInterlocutors(java.lang.String username)
Get all interlocutors of user. |
java.util.List<java.lang.String> |
getJoinedRooms()
Get already joined rooms. |
org.jivesoftware.smackx.muc.MultiUserChat |
getMultiUserChat(java.lang.String room)
|
MultiUserChatManager |
getMultiUserChatManager()
|
java.util.List<HistoricalMessage> |
getNotRecieveMessages()
Get all not received message. |
org.jivesoftware.smackx.muc.RoomInfo |
getRoomInfo(java.lang.String room)
|
FullRoomInfoBean |
getRoomInfoBean(java.lang.String room)
Get full information about room. |
InitInfoBean |
getRooms(java.lang.Integer from,
java.lang.Integer to,
java.lang.String sort)
|
org.jivesoftware.smackx.Form |
getSearchForm(java.lang.String searchService)
Get form for searching users. |
java.util.List<java.lang.String> |
getSearchServices()
|
org.exoplatform.services.jcr.ext.common.SessionProvider |
getSessionProvider()
|
UserInfo |
getUserInfo(java.lang.String userID)
Get the information about user by user id. |
java.lang.String |
getUsername()
Get the username. |
java.lang.Boolean |
inviteToRoom(java.lang.String room,
java.lang.String invitee,
java.lang.String reason)
Invite to the room. |
java.lang.Boolean |
isJoin(java.lang.String room)
True if join in the room. |
boolean |
isPasswordRequired(java.lang.String room)
|
void |
joinRoom(java.lang.String room,
java.lang.String nickname,
java.lang.String password)
Join to the group chat. |
void |
kickUser(java.lang.String room,
java.lang.String nickname,
java.lang.String reason)
|
java.lang.Boolean |
leaveRoom(java.lang.String room)
Leave the room. |
void |
manageAffiliation(java.lang.String room,
java.lang.String nickname,
java.lang.String affiliation,
java.lang.String command)
|
void |
manageRole(java.lang.String room,
java.lang.String nickname,
java.lang.String role,
java.lang.String command)
The manage role of user in the room. |
void |
messageReceive(java.lang.String messageId)
Set that message is received. |
void |
rejectFile(java.lang.String uuid)
|
void |
removeAllTransport()
Remove all transport subscribed for current user. |
boolean |
removeBuddy(java.lang.String name)
Remove remote user from contacts list. |
boolean |
removeTransport(Transport transport)
Remove transport from available list. |
org.jivesoftware.smackx.ReportedData |
searchUser(java.lang.String search,
boolean byUsername,
boolean byName,
boolean byEmail,
java.lang.String searchService)
|
void |
sendErrorMessage(java.lang.String msg,
java.lang.String sender)
|
void |
sendFile(java.lang.String requestor,
java.lang.String path,
java.lang.String description,
boolean isRoom)
|
void |
sendMessage(org.jivesoftware.smack.packet.Message message)
Send message. |
void |
sendMessageToMUC(java.lang.String room,
java.lang.String body)
Send message to the room. |
void |
sendPresence(org.jivesoftware.smack.packet.Presence presence)
Change presence for current user. |
void |
subscribeUser(java.lang.String user)
Subscribe remote user and send message to that user. |
void |
subscribeUser(java.lang.String toUser,
java.lang.String serviceName)
Subscribe remote user and send message to that user. |
void |
unsubscribeUser(java.lang.String user)
Unsubscribe remote user and send message to that user. |
void |
unsubscribeUser(java.lang.String toUser,
java.lang.String serviceName)
Unsubscribe remote user and send message to that user. |
void |
updateBuddy(java.lang.String username,
java.lang.String nickname,
java.lang.String group)
Update the buddy in roster. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected XMPPSessionImpl(java.lang.String username,
java.lang.String password,
UserInfoService organization,
org.exoplatform.ws.frameworks.cometd.transport.ContinuationServiceDelegate delegate,
HistoryImpl history,
java.util.ResourceBundle rb)
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPException| Method Detail |
|---|
public boolean addTransport(Transport transport,
java.lang.String remoteUser,
java.lang.String remotePassword,
boolean autoLogin)
Transport supported and add it to List
of available transports. User can use remote accounts on other IM servers.
(ICQ, Yahoo, etc).
addTransport in interface XMPPSessiontransport - the name of transportremoteUser - the usernameremotePassword - the passwordautoLogin - not working now
public void addBuddy(java.lang.String username,
java.lang.String nickname,
java.lang.String group)
throws org.jivesoftware.smack.XMPPException
addBuddy in interface XMPPSessionusername - the usernamenickname - the nicknamegroup - the group
org.jivesoftware.smack.XMPPException - the XMPPException
public void askForSubscription(java.lang.String username,
java.lang.String nickname)
askForSubscription in interface XMPPSessionusername - the usernamenickname - the nicknamepublic org.jivesoftware.smack.RosterEntry getBuddy(java.lang.String name)
getBuddy in interface XMPPSessionname - the username
public void updateBuddy(java.lang.String username,
java.lang.String nickname,
java.lang.String group)
throws org.jivesoftware.smack.XMPPException
updateBuddy in interface XMPPSessionusername - the useranmenickname - the nickanmegroup - the group
org.jivesoftware.smack.XMPPException - the XMPPExceptionpublic void createGroup(java.lang.String grop)
grop - the group name
public boolean cleanBuddiesList()
throws org.jivesoftware.smack.XMPPException
cleanBuddiesList in interface XMPPSessionorg.jivesoftware.smack.XMPPExceptionpublic void close()
close in interface XMPPSession
public java.util.List<HistoricalMessage> getAllHistory(java.lang.String usernameto,
java.lang.String usernamefrom,
boolean isGroupChat)
getAllHistory in interface XMPPSessionusernameto - the username who recive messageusernamefrom - the username who send messageisGroupChat - is the group chat
public java.util.List<org.jivesoftware.smack.packet.Presence> getBuddiesPresense()
Presence for all buddies for current user.
getBuddiesPresense in interface XMPPSessionPresence.public org.jivesoftware.smack.XMPPConnection getConnection()
getConnection in interface XMPPSession
public java.util.List<HistoricalMessage> getHistoryBetweenDate(java.lang.String usernameto,
java.lang.String usernamefrom,
boolean isGroupChat,
java.util.Date dateFrom,
java.util.Date dateTo)
getHistoryBetweenDate in interface XMPPSessionusernameto - the username who recive messageusernamefrom - the username who send messageisGroupChat - is the group chatdateFrom - the begindateTo - the end
public java.util.List<HistoricalMessage> getHistoryFromDateToNow(java.lang.String usernameto,
java.lang.String usernamefrom,
boolean isGroupChat,
java.util.Date dateFrom)
getHistoryFromDateToNow in interface XMPPSessionusernameto - the username who recive messageusernamefrom - the username who send messageisGroupChat - is the group chatdateFrom - the begin
public java.util.List<HistoricalMessage> getNotRecieveMessages()
getNotRecieveMessages in interface XMPPSessionpublic java.util.List<Interlocutor> getInterlocutors(java.lang.String username)
getInterlocutors in interface XMPPSessionusername - thr username
public MultiUserChatManager getMultiUserChatManager()
public java.lang.Boolean isJoin(java.lang.String room)
throws org.jivesoftware.smack.XMPPException
isJoin in interface XMPPSessionroom - the room name
org.jivesoftware.smack.XMPPException - the XMPPException
public org.jivesoftware.smackx.Form getSearchForm(java.lang.String searchService)
throws org.jivesoftware.smack.XMPPException
getSearchForm in interface XMPPSessionsearchService - the name of searchService
org.jivesoftware.smack.XMPPExceptionpublic java.util.List<java.lang.String> getSearchServices()
getSearchServices in interface XMPPSessionpublic UserInfo getUserInfo(java.lang.String userID)
getUserInfo in interface XMPPSessionuserID - the user id
public java.lang.String getUsername()
getUsername in interface XMPPSession
public void removeAllTransport()
throws org.jivesoftware.smack.XMPPException
removeAllTransport in interface XMPPSessionorg.jivesoftware.smack.XMPPException
public boolean removeBuddy(java.lang.String name)
throws org.jivesoftware.smack.XMPPException
removeBuddy in interface XMPPSessionname - the full ID of remote user.
org.jivesoftware.smack.XMPPException
public boolean removeTransport(Transport transport)
throws org.jivesoftware.smack.XMPPException
removeTransport in interface XMPPSessiontransport - the Transport.
org.jivesoftware.smack.XMPPException
public org.jivesoftware.smackx.ReportedData searchUser(java.lang.String search,
boolean byUsername,
boolean byName,
boolean byEmail,
java.lang.String searchService)
throws org.jivesoftware.smack.XMPPException
searchUser in interface XMPPSessionsearch - the search string.byUsername - search in useranmebyName - search in namebyEmail - search in mailsearchService - the SearchService name.
org.jivesoftware.smack.XMPPExceptionpublic void sendMessage(org.jivesoftware.smack.packet.Message message)
sendMessage in interface XMPPSessionmessage - the message
public void sendMessageToMUC(java.lang.String room,
java.lang.String body)
throws org.jivesoftware.smack.XMPPException
sendMessageToMUC in interface XMPPSessionroom - the room namebody - the body of message
org.jivesoftware.smack.XMPPException - the XMPPExceptionpublic void sendPresence(org.jivesoftware.smack.packet.Presence presence)
sendPresence in interface XMPPSessionpresence - the new Presence.public void subscribeUser(java.lang.String user)
subscribeUser in interface XMPPSessionuser - the full ID of remote user.
public void subscribeUser(java.lang.String toUser,
java.lang.String serviceName)
subscribeUser in interface XMPPSessiontoUser - the remote user.serviceName - the service name.public void unsubscribeUser(java.lang.String user)
unsubscribeUser in interface XMPPSessionuser - the full ID of remote user.
public void unsubscribeUser(java.lang.String toUser,
java.lang.String serviceName)
unsubscribeUser in interface XMPPSessiontoUser - the remote user.serviceName - the service name.public void messageReceive(java.lang.String messageId)
messageReceive in interface XMPPSessionmessageId - the id of messagepublic org.exoplatform.services.jcr.ext.common.SessionProvider getSessionProvider()
public org.jivesoftware.smackx.muc.MultiUserChat getMultiUserChat(java.lang.String room)
throws org.jivesoftware.smack.XMPPException
getMultiUserChat in interface XMPPSessionroom - the name of room
org.jivesoftware.smack.XMPPException - the XMPPException
public FormBean createRoom(java.lang.String room,
java.lang.String nickname)
throws org.jivesoftware.smack.XMPPException
createRoom in interface XMPPSessionroom - the room namenickname - the nickname in this room
org.jivesoftware.smack.XMPPException - the XMPPException
public FormBean getConfigFormRoom(java.lang.String room)
throws org.jivesoftware.smack.XMPPException
getConfigFormRoom in interface XMPPSessionroom - the room name
org.jivesoftware.smack.XMPPException - the XMPPException
public org.jivesoftware.smackx.muc.MultiUserChat configRoom(java.lang.String room,
ConfigRoomBean cr)
throws org.jivesoftware.smack.XMPPException
configRoom in interface XMPPSessionroom - the room namecr - the configuration of group chat
org.jivesoftware.smack.XMPPException - the XMPPExceptionpublic boolean isPasswordRequired(java.lang.String room)
roomJID - the room id
public void joinRoom(java.lang.String room,
java.lang.String nickname,
java.lang.String password)
throws org.jivesoftware.smack.XMPPException
joinRoom in interface XMPPSessionroom - the room namenickname - the nicknamepassword - the password
org.jivesoftware.smack.XMPPException - the XMPPException
public InitInfoBean getRooms(java.lang.Integer from,
java.lang.Integer to,
java.lang.String sort)
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPException
public void changeSubject(java.lang.String room,
java.lang.String newSubject)
throws org.jivesoftware.smack.XMPPException
changeSubject in interface XMPPSessionroom - the room namenewSubject - the new subject
org.jivesoftware.smack.XMPPException - the XMPPException
public void changeAvailabilityStatusInRoom(java.lang.String room,
java.lang.String status,
java.lang.String mode)
throws org.jivesoftware.smack.XMPPException
changeAvailabilityStatusInRoom in interface XMPPSessionroom - the room namestatus - the statusmode - the mode
org.jivesoftware.smack.XMPPException - the XMPPExceptionpublic java.util.List<java.lang.String> getJoinedRooms()
getJoinedRooms in interface XMPPSession
public FullRoomInfoBean getRoomInfoBean(java.lang.String room)
throws org.jivesoftware.smack.XMPPException
getRoomInfoBean in interface XMPPSessionroom - the name of room
org.jivesoftware.smack.XMPPException - the XMPPException
public org.jivesoftware.smackx.muc.RoomInfo getRoomInfo(java.lang.String room)
throws org.jivesoftware.smack.XMPPException
getRoomInfo in interface XMPPSessionorg.jivesoftware.smack.XMPPException
public void declineRoom(java.lang.String room,
java.lang.String inviter,
java.lang.String reason)
declineRoom in interface XMPPSessionroom - the roominviter - the inviterreason - the reason
public java.lang.Boolean inviteToRoom(java.lang.String room,
java.lang.String invitee,
java.lang.String reason)
throws org.jivesoftware.smack.XMPPException
inviteToRoom in interface XMPPSessionroom - the room nameinvitee - the inviteereason - the reason
org.jivesoftware.smack.XMPPException - the XMPPException
public java.lang.Boolean leaveRoom(java.lang.String room)
throws org.jivesoftware.smack.XMPPException
leaveRoom in interface XMPPSessionroom - the room name
org.jivesoftware.smack.XMPPException - the XMPPException
public void manageRole(java.lang.String room,
java.lang.String nickname,
java.lang.String role,
java.lang.String command)
throws org.jivesoftware.smack.XMPPException
manageRole in interface XMPPSessionnickname - the nicknamerole - the rolecommand - the command (grant or revoke)
org.jivesoftware.smack.XMPPException - the XMPPException
public void kickUser(java.lang.String room,
java.lang.String nickname,
java.lang.String reason)
throws org.jivesoftware.smack.XMPPException
kickUser in interface XMPPSessionnickname - the nicknamereason - the reason
org.jivesoftware.smack.XMPPException - the XMPPException
public void banUser(java.lang.String room,
java.lang.String nickname,
java.lang.String reason)
throws org.jivesoftware.smack.XMPPException
banUser in interface XMPPSessionnickname - the usernamereason - the reason
org.jivesoftware.smack.XMPPException - the XMPPException
public void changeNickname(java.lang.String room,
java.lang.String nickname)
throws org.jivesoftware.smack.XMPPException
changeNickname in interface XMPPSessionroom - the room namenickname - the new nickname
org.jivesoftware.smack.XMPPException - the XMPPException
public java.lang.Boolean destroyRoom(java.lang.String room,
java.lang.String reason,
java.lang.String altRoom)
throws org.jivesoftware.smack.XMPPException
destroyRoom in interface XMPPSessionroom - the room namereason - the reasonaltRoom - the name of alter room
org.jivesoftware.smack.XMPPException - the XMPPException
public void manageAffiliation(java.lang.String room,
java.lang.String nickname,
java.lang.String affiliation,
java.lang.String command)
throws org.jivesoftware.smack.XMPPException
manageAffiliation in interface XMPPSessionnickname - the usernameaffiliation - the affiliatecommand - the command (grant or revoke)
org.jivesoftware.smack.XMPPException - the XMPPExceptionpublic org.jivesoftware.smackx.filetransfer.FileTransferRequest getFileTransferRequest(java.lang.String uuid)
uuid - the id
public void sendFile(java.lang.String requestor,
java.lang.String path,
java.lang.String description,
boolean isRoom)
throws java.lang.Exception
requestor - the requestorpath - the pathdescription - the descriptionisRoom - true if file send to the group chat
java.lang.Exceptionpublic void rejectFile(java.lang.String uuid)
uuid - the id
public void sendErrorMessage(java.lang.String msg,
java.lang.String sender)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||