|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The CommLib interface describes the contract all communication libraries must abide by. It provides a common interface for all IM services.
Method Summary | |
void |
bindCallback(CommLibCallback callback)
Binds the communication library to a callback object. |
boolean |
connect(String loggin,
String password)
Establishes a connection to the IM server. |
void |
disconnect()
Terminates connection to the IM server. |
void |
doPing()
Force the CommLib to ping its connection. |
String |
getWarningLevel()
Gets the current warning level of this account. |
String |
identifyProtocal()
Returns a string identifying the protocal this library implements. |
void |
sendMessage(IM message)
Sends an instant message over the network. |
void |
sendWarning(String screenName,
boolean anonymous)
Attempts to warn an individual. |
Method Detail |
public void bindCallback(CommLibCallback callback)
callback
- public boolean connect(String loggin, String password)
loggin
- password
-
public void disconnect()
public void sendMessage(IM message)
message
- public void sendWarning(String screenName, boolean anonymous)
screenName
- The target.anonymous
- If true, attempt to warn anonymously.public String getWarningLevel()
public String identifyProtocal()
public void doPing()
Force the CommLib to ping its connection.
This will always be called from the connection maintnance thread, thus, the doPing implementation must block until the action is complete. The spirit of this method is to attempt to send a self addressed message, and reconnect to the network if the message fails to come through.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |