|
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.sysactivity.SystemActivityNotifications.NotificationsDelegate
net.java.sip.communicator.impl.sysactivity.SystemActivityNotificationsServiceImpl
public class SystemActivityNotificationsServiceImpl
Service implementation listens for computer changes as sleeping, network change, inactivity.
| Constructor Summary | |
|---|---|
SystemActivityNotificationsServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addIdleSystemChangeListener(long idleTime,
SystemActivityChangeListener listener)
Registers a listener that would be notified for idle of the system for idleTime. |
void |
addSystemActivityChangeListener(SystemActivityChangeListener listener)
Registers a listener that would be notified of changes that have occurred in the underlying system. |
protected void |
fireSystemActivityEvent(SystemActivityEvent evt)
Delivers the specified event to all registered listeners. |
protected void |
fireSystemIdleEndEvent(SystemActivityChangeListener listener)
Delivers the specified event to listener. |
protected void |
fireSystemIdleEvent(SystemActivityChangeListener listener)
Delivers the specified event to all registered listeners. |
boolean |
isSupported(int eventID)
Can check whether an event id is supported on current operation system. |
void |
notify(int type)
Callback method when receiving notifications. |
void |
notifyNetworkChange(int family,
long luidIndex,
String name,
long type,
boolean connected)
Callback method when receiving special network notifications. |
void |
removeIdleSystemChangeListener(SystemActivityChangeListener listener)
Remove the specified listener so that it won't receive further notifications for idle system. |
void |
removeSystemActivityChangeListener(SystemActivityChangeListener listener)
Remove the specified listener so that it won't receive further notifications of changes that occur in the underlying system |
void |
run()
The thread run method that handles idle notifies. |
void |
start()
Init and start notifications. |
void |
stop()
Stop notifications. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SystemActivityNotificationsServiceImpl()
| Method Detail |
|---|
public void start()
public void stop()
public void addSystemActivityChangeListener(SystemActivityChangeListener listener)
addSystemActivityChangeListener in interface SystemActivityNotificationsServicelistener - the listener that we'd like to register for changes in
the underlying system.public void removeSystemActivityChangeListener(SystemActivityChangeListener listener)
removeSystemActivityChangeListener in interface SystemActivityNotificationsServicelistener - the listener to remove.
public void addIdleSystemChangeListener(long idleTime,
SystemActivityChangeListener listener)
addIdleSystemChangeListener in interface SystemActivityNotificationsServiceidleTime - the time in milliseconds after which we will consider
system to be idle. This doesn't count when system seems idle as
monitor is off or screensaver is on, or desktop is locked.listener - the listener that we'd like to register for changes in
the underlying system.public void removeIdleSystemChangeListener(SystemActivityChangeListener listener)
removeIdleSystemChangeListener in interface SystemActivityNotificationsServicelistener - the listener to remove.public void notify(int type)
notify in class SystemActivityNotifications.NotificationsDelegatetype - type of the notification.
public void notifyNetworkChange(int family,
long luidIndex,
String name,
long type,
boolean connected)
notifyNetworkChange in class SystemActivityNotifications.NotificationsDelegatefamily - family of network change (ipv6, ipv4)
AF_UNSPEC = 0 (The address family is unspecified.)
AF_INET = 2 (The Internet Protocol version 4 (IPv4) address family)
AF_INET6 = 23 (The Internet Protocol version 6 (IPv6) address family)luidIndex - unique index of interfacename - name of the interfacetype - of the interface
Possible values for the interface type are listed in the Ipifcons.h file.
common values:
IF_TYPE_OTHER = 1 (Some other type of network interface.)
IF_TYPE_ETHERNET_CSMACD = 6 (An Ethernet network interface.)
IF_TYPE_ISO88025_TOKENRING = 9 (A token ring network interface.)
IF_TYPE_PPP = 23 (A PPP network interface.)
IF_TYPE_SOFTWARE_LOOPBACK = 24 (A software loopback network interface.)
IF_TYPE_IEEE80211 = 71 (An IEEE 802.11 wireless network interface.)
IF_TYPE_TUNNEL = 131 (A tunnel type encapsulation network interface.)
IF_TYPE_IEEE1394 = 144 (An IEEE 1394 (Firewire) high performance
serial bus network interface.)connected - whether interface is connected or not.public void run()
run in interface RunnableThread.run()protected void fireSystemActivityEvent(SystemActivityEvent evt)
evt - the SystemActivityEvent that we'd like delivered to
all registered message listeners.protected void fireSystemIdleEvent(SystemActivityChangeListener listener)
listener - listener to informprotected void fireSystemIdleEndEvent(SystemActivityChangeListener listener)
listener - listener to informpublic boolean isSupported(int eventID)
isSupported in interface SystemActivityNotificationsServiceeventID - the event to check.
|
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 | |||||||||