java.lang.Object
org.cybergarage.upnp.xml.NodeData
org.cybergarage.upnp.xml.ServiceData
Data container for UPnP service information and metadata.
This class extends NodeData to represent service definitions from UPnP device descriptions. It encapsulates metadata about services including action listeners, subscribers, and service configuration.
Key features:
- Action listener management
- Subscriber list handling
- Service configuration data
- XML node data inheritance
- Event notification support
This class is used by UPnP services to manage their metadata, listener registrations, and subscriber information, enabling proper service operation and event notification functionality.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ListenerList/////////////////////////////////////////////private String/////////////////////////////////////////////private Node/////////////////////////////////////////////private String/////////////////////////////////////////////private SubscriberList/////////////////////////////////////////////private long/////////////////////////////////////////////Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionReturns the control action listener list.Returns the URL of the device description document.Returns the service control protocol description node.getSID()Returns the subscription identifier for this service.Returns the subscribers registered for this service.longReturns the requested subscription duration.voidsetDescriptionURL(String descriptionURL) Records the URL of the device description document.voidsetSCPDNode(Node node) Records the service control protocol description.voidRecords the subscription identifier for this service.voidsetTimeout(long value) Records the requested subscription duration.
Field Details
controlActionListenerList
/////////////////////////////////////////////scpdNode
/////////////////////////////////////////////subscriberList
/////////////////////////////////////////////descriptionURL
/////////////////////////////////////////////sid
/////////////////////////////////////////////timeout
private long timeout/////////////////////////////////////////////
Constructor Details
ServiceData
public ServiceData()Creates an empty service data record.
Method Details
getControlActionListenerList
Returns the control action listener list.- Returns:
- the listeners registered to receive this service's control actions
getSCPDNode
Returns the service control protocol description node.- Returns:
- the parsed service control protocol description node, null if none was set
setSCPDNode
Records the service control protocol description.- Parameters:
node- the parsed service control protocol description to hold
getSubscriberList
Returns the subscribers registered for this service.- Returns:
- the subscribers currently registered for this service
getDescriptionURL
Returns the URL of the device description document.- Returns:
- the URL of the device description document this service came from
setDescriptionURL
Records the URL of the device description document.- Parameters:
descriptionURL- the URL of the device description document this service came from
getSID
Returns the subscription identifier for this service.- Returns:
- the subscription identifier issued for this service
setSID
Records the subscription identifier for this service.- Parameters:
id- the subscription identifier issued for this service
getTimeout
public long getTimeout()Returns the requested subscription duration.- Returns:
- the subscription duration in seconds, 0 when the subscription was never leased
setTimeout
public void setTimeout(long value) Records the requested subscription duration.- Parameters:
value- the subscription duration in seconds requested at lease time