org.ocap.hn.upnp.server
Interface UPnPStateVariableHandler


public interface UPnPStateVariableHandler

This interface represents a handler for the evented UPnP state variables on a service. The hander is called as a result of incoming subscription and query actions, and supplies the state variable values to be evented.


Method Summary
 String getValue(UPnPManagedStateVariable variable)
          Notifies the listener that a control point has requested the value of a state variable through the QueryStateVariable action.
 void notifySubscribed(UPnPManagedService service)
          Notifies the listener that a control point has subscribed to state variable eventing on the specified service.
 void notifyUnsubscribed(UPnPManagedService service, int remainingSubs)
          Notifies the listener that a control point has successfully unsubscribed from state variable eventing on the specified service, or that a prior subscription has expired.
 

Method Detail

getValue

String getValue(UPnPManagedStateVariable variable)
Notifies the listener that a control point has requested the value of a state variable through the QueryStateVariable action. The handler must return the current value of the requested state variable.

Parameters:
variable - The UPnP state variable that was queried.
Returns:
The current value of the state variable.

notifySubscribed

void notifySubscribed(UPnPManagedService service)
Notifies the listener that a control point has subscribed to state variable eventing on the specified service. This method is called subsequent to the transmission of subscription response message, but prior to the transmission of the initial event message. The eventing process blocks until this method returns, permitting the handler to set the initial values of the service's state variables as desired.

Parameters:
service - The UPnP service that was subscribed to.

notifyUnsubscribed

void notifyUnsubscribed(UPnPManagedService service,
                        int remainingSubs)
Notifies the listener that a control point has successfully unsubscribed from state variable eventing on the specified service, or that a prior subscription has expired. This method is called subsequent to the transmission of the unsubscription response message.

Parameters:
service - The UPnP service that was unsubscribed from.
remainingSubs - The number of remaining active subscriptions to this service.


Copyright © 2011. All Rights Reserved.