|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sbbi.upnp.ServicesEventing
This class can be used with the ServiceEventHandler interface to recieve notifications about state variables changes on a given UPNP service.
Method Summary | |
static ServicesEventing |
getInstance()
|
int |
register(UPNPService service,
ServiceEventHandler handler,
int subscriptionDuration)
Register state variable events notification for a device service |
ServiceEventSubscription |
registerEvent(UPNPService service,
ServiceEventHandler handler,
int subscriptionDuration)
Register state variable events notification for a device service |
void |
run()
|
void |
setDaemon(boolean daemon)
Set the listeniner thread as a daemon, default to true. |
void |
setDaemonPort(int daemonPort)
Sets the listener thread port, default to 9999. |
boolean |
unRegister(UPNPService service,
ServiceEventHandler handler)
Unregisters events notifications from a service |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final ServicesEventing getInstance()
public void setDaemon(boolean daemon)
daemon
- the new thread type.public void setDaemonPort(int daemonPort)
daemonPort
- the new listening portpublic int register(UPNPService service, ServiceEventHandler handler, int subscriptionDuration) throws java.io.IOException
service
- the service to register withhandler
- the registrant objectsubscriptionDuration
- subscription time in seconds, -1 for infinite time
java.io.IOException
- if some IOException error happens during coms with the devicepublic ServiceEventSubscription registerEvent(UPNPService service, ServiceEventHandler handler, int subscriptionDuration) throws java.io.IOException
service
- the service to register withhandler
- the registrant objectsubscriptionDuration
- subscription time in seconds, -1 for infinite time
java.io.IOException
- if some IOException error happens during coms with the devicepublic boolean unRegister(UPNPService service, ServiceEventHandler handler) throws java.io.IOException
service
- the service that need to be unregisteredhandler
- the handler that registered for this service
java.io.IOException
- if some IOException error happens during coms with the devicepublic void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |