|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sbbi.upnp.ServicesEventing
public class 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 |
|---|
clone, equals, finalize, 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 port
public int register(UPNPService service,
ServiceEventHandler handler,
int subscriptionDuration)
throws IOException
service - the service to register withhandler - the registrant objectsubscriptionDuration - subscription time in seconds, -1 for infinite time
IOException - if some IOException error happens during coms with the device
public ServiceEventSubscription registerEvent(UPNPService service,
ServiceEventHandler handler,
int subscriptionDuration)
throws IOException
service - the service to register withhandler - the registrant objectsubscriptionDuration - subscription time in seconds, -1 for infinite time
IOException - if some IOException error happens during coms with the device
public boolean unRegister(UPNPService service,
ServiceEventHandler handler)
throws IOException
service - the service that need to be unregisteredhandler - the handler that registered for this service
IOException - if some IOException error happens during coms with the devicepublic void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||