|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.netaddr.NetworkEventDispatcher
public class NetworkEventDispatcher
The class implements a dispatch event thread. The thread will fire event every time it is added through the fireChangeEvent() method and would then deliver it to a registered listener if any. (No fire would be performed until we have a NetworkConfigurationChangeListener). If the event has time set we used it as a delay before dispatching the event.
| Constructor Summary | |
|---|---|
NetworkEventDispatcher()
|
|
| Method Summary | |
|---|---|
(package private) void |
addNetworkConfigurationChangeListener(NetworkConfigurationChangeListener listener)
Adds new NetworkConfigurationChangeListener which will be informed for network configuration changes. |
protected void |
fireChangeEvent(ChangeEvent evt)
Fire ChangeEvent. |
protected void |
fireChangeEvent(ChangeEvent evt,
int wait)
Fire ChangeEvent. |
(package private) static void |
fireChangeEvent(ChangeEvent evt,
NetworkConfigurationChangeListener listener)
Fire ChangeEvent. |
boolean |
isRunning()
Returns true if this dispatcher is currently running and delivering events when available and false otherwise. |
(package private) void |
removeNetworkConfigurationChangeListener(NetworkConfigurationChangeListener listener)
Remove NetworkConfigurationChangeListener. |
void |
run()
Runs the waiting thread. |
void |
stop()
Interrupts this dispatcher so that it would no longer disptach events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetworkEventDispatcher()
| Method Detail |
|---|
void addNetworkConfigurationChangeListener(NetworkConfigurationChangeListener listener)
listener - the listener.void removeNetworkConfigurationChangeListener(NetworkConfigurationChangeListener listener)
listener - the listener.protected void fireChangeEvent(ChangeEvent evt)
evt - the event to fire.
protected void fireChangeEvent(ChangeEvent evt,
int wait)
evt - the event to fire.
static void fireChangeEvent(ChangeEvent evt,
NetworkConfigurationChangeListener listener)
evt - the event to fire.public void run()
run in interface Runnablepublic void stop()
public boolean isRunning()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||