|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMsgService
The task of the InterClient Communication Service (ICService) is to provide a communication layer based on the network for communication between users based on messages and objects.
userid: A way of identifying the user within the used network protocol. example: user@host
network service: The implementation of IICService use some sort of Interclient Communication protocol. We reference to this underlying system as network service. examples: XMPP, TCP-Sockets, ...
Method Summary | |
---|---|
IMsgService |
getFriendMsgService()
get a MsgService that can only send and receive from the UserIds in IUsersService |
void |
registerLoginStateListener(ILoginStateListener loginListener)
|
void |
registerReceiveMessageListener(IMessageReceiveListener receiveListener)
Registers a callback for the event that a message is received. |
java.lang.Boolean |
sendMessage(UserId to_userid,
java.lang.String content)
Sends a message to another user. |
void |
unRegisterLoginStateListener(ILoginStateListener loginListener)
|
void |
unRegisterReceiveMessageListener(IMessageReceiveListener receiveListener)
Unregisteres a previously registered callback. |
Method Detail |
---|
java.lang.Boolean sendMessage(UserId to_userid, java.lang.String content) throws NetworkException, TimeoutException, NoSuchUseridException, OtherUserOfflineException
to_userid
- Userid to send tocontent
- Full message content as String
NetworkException
- if the network connection is down
NotLoggedInException
- if the user is not logged in
TimeoutException
- if a timeout occured
NoSuchUseridException
OtherUserOfflineException
void registerReceiveMessageListener(IMessageReceiveListener receiveListener)
receiveListener
- object to be calledvoid registerLoginStateListener(ILoginStateListener loginListener)
IMsgService getFriendMsgService()
IUsersService
void unRegisterReceiveMessageListener(IMessageReceiveListener receiveListener)
receiveListener
- previously registered callback.void unRegisterLoginStateListener(ILoginStateListener loginListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |