|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IConnectionService
The client should use this interface if there is a need to connect to Gadu-Gadu server or disconnect from it. Also client can register itself as a listener for the connection related events.
Created on 2004-11-27
ConnectionListener| Method Summary | |
|---|---|
void |
addConnectionListener(ConnectionListener connectionListener)
Adds ConnectionListener object to the list
of listeners that will receive notification of connection
related events. |
void |
addPacketListener(GGPacketListener packetListener)
Adds GGPacketListener object to the list of listeners
that will be notified of Gadu-Gadu packet related events. |
void |
addPingListener(PingListener pingListener)
|
void |
connect(IServer server)
Tries to connect to Gadu-Gadu server that has been previously assigned to Session instance. |
void |
disconnect()
Tries to close the connection to the Gadu-Gadu server. |
IServer |
getServer()
Get server user is currently connected to, returns null if user is not connected to any server. |
boolean |
isConnected()
Method to check if we are connected or not. |
IServer |
lookupServer(int uin)
|
void |
removeConnectionListener(ConnectionListener connectionListener)
Remove ConnectionListener object from the list
that will receive notification of connection related events. |
void |
removePacketListener(GGPacketListener packetListener)
Remove GGPacketListener object from the list of listeners
that will be notified of Gadu-Gadu packet related events. |
void |
removePingListener(PingListener pingListener)
|
| Method Detail |
|---|
IServer lookupServer(int uin)
throws GGException
GGException
void connect(IServer server)
throws GGException
Session instance.
GGException - if error occurs while connecting to Gadu-Gadu server.
GGSessionException - if there is an incorrect session state.
void disconnect()
throws GGException
GGSessionException - if there is an incorrect session state.
GGExceptionboolean isConnected()
IServer getServer()
void addConnectionListener(ConnectionListener connectionListener)
ConnectionListener object to the list
of listeners that will receive notification of connection
related events.
connectionListener - that will be added to the list of connection listeners.
java.lang.NullPointerException - if the ConnectionListener object is null.ConnectionListenervoid removeConnectionListener(ConnectionListener connectionListener)
ConnectionListener object from the list
that will receive notification of connection related events.
The listener will no longer be notified of connection related events.
connectionListener - that will be removed from the list of connection listeners.
java.lang.NullPointerException - if the ConnectionListener objct is null.ConnectionListenervoid addPacketListener(GGPacketListener packetListener)
GGPacketListener object to the list of listeners
that will be notified of Gadu-Gadu packet related events.
packetListener - that will be added to the list of packet listeners.
java.lang.NullPointerException - if the GGPacketListener instance is null.GGPacketListenervoid removePacketListener(GGPacketListener packetListener)
GGPacketListener object from the list of listeners
that will be notified of Gadu-Gadu packet related events.
packetListener - that will be removed from the list of packet listeners.
java.lang.NullPointerException - if the GGPacketListener instance is null.- See Also:
GGPacketListenervoid addPingListener(PingListener pingListener)
void removePingListener(PingListener pingListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||