|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hamsam.protocol.ProtocolManager
Provides an interface for manipulating all available protocols. This class enables the plug-and-play behaviour of Hamsam. Users of Hamsam library may use this class to manipulate all available protocols without knowing actually what all protocols are available at compile time. This means that you can easily switch between different versions of Hamsam without changing your code. As and when new versions of the library comes up with support for new protocols, you can just remove the old version from the classpath and put the new library to the classpath. If the application is coded properly, it will start supporting the new protocols without any change of code.
Protocol
,
Serialized FormConstructor Summary | |
ProtocolManager()
|
Method Summary | |
static void |
changeStatus(java.lang.String status)
Change your status message for all protocols which are connected. |
static Protocol[] |
getAvailableProtocols()
Get all available protocols. |
static void |
setIMListener(IMListener listener)
Set the listener which will receive all instant messaging events from all available protocols. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProtocolManager()
Method Detail |
public static void setIMListener(IMListener listener)
listener
- the listener to be registered, pass
null
to unregister the
current listener.public static Protocol[] getAvailableProtocols()
public static void changeStatus(java.lang.String status) throws IllegalArgumentException
status
- the new status message.
IllegalArgumentException
- if status
is null and a
protocol does not support invisible status.Protocol.isInvisibleSupported()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |