Package org.cybergarage.upnp
Class Service
- java.lang.Object
- 
- org.cybergarage.upnp.Service
 
- 
 public class Service extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringELEM_NAMEstatic StringMAJORstatic StringMAJOR_VALUEstatic StringMINORstatic StringMINOR_VALUEstatic StringSCPD_ROOTNODEstatic StringSCPD_ROOTNODE_NSstatic StringSPEC_VERSION
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
ELEM_NAMEpublic static final String ELEM_NAME - See Also:
- Constant Field Values
 
 - 
SCPD_ROOTNODEpublic static final String SCPD_ROOTNODE - See Also:
- Constant Field Values
 
 - 
SCPD_ROOTNODE_NSpublic static final String SCPD_ROOTNODE_NS - See Also:
- Constant Field Values
 
 - 
SPEC_VERSIONpublic static final String SPEC_VERSION - See Also:
- Constant Field Values
 
 - 
MAJORpublic static final String MAJOR - See Also:
- Constant Field Values
 
 - 
MAJOR_VALUEpublic static final String MAJOR_VALUE - See Also:
- Constant Field Values
 
 - 
MINORpublic static final String MINOR - See Also:
- Constant Field Values
 
 - 
MINOR_VALUEpublic static final String MINOR_VALUE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Servicepublic Service() 
 - 
Servicepublic Service(Node node) 
 
- 
 - 
Method Detail- 
getServiceNodepublic Node getServiceNode() 
 - 
lockpublic void lock() 
 - 
unlockpublic void unlock() 
 - 
isServiceNodepublic static boolean isServiceNode(Node node) 
 - 
getDevicepublic Device getDevice() 
 - 
getRootDevicepublic Device getRootDevice() 
 - 
setServiceTypepublic void setServiceType(String value) 
 - 
getServiceTypepublic String getServiceType() 
 - 
setServiceIDpublic void setServiceID(String value) 
 - 
getServiceIDpublic String getServiceID() 
 - 
updateConfigIdpublic void updateConfigId() 
 - 
getConfigIdpublic int getConfigId() 
 - 
setSCPDURLpublic void setSCPDURL(String value) 
 - 
getSCPDURLpublic String getSCPDURL() 
 - 
isSCPDURLpublic boolean isSCPDURL(String url) 
 - 
setControlURLpublic void setControlURL(String value) 
 - 
getControlURLpublic String getControlURL() 
 - 
isControlURLpublic boolean isControlURL(String url) 
 - 
setEventSubURLpublic void setEventSubURL(String value) 
 - 
getEventSubURLpublic String getEventSubURL() 
 - 
isEventSubURLpublic boolean isEventSubURL(String url) 
 - 
loadSCPDpublic boolean loadSCPD(String scpdStr) throws InvalidDescriptionException - Throws:
- InvalidDescriptionException
 
 - 
loadSCPDpublic boolean loadSCPD(File file) throws ParserException - Throws:
- ParserException
 
 - 
loadSCPDpublic boolean loadSCPD(InputStream input) throws ParserException - Throws:
- ParserException
- Since:
- 1.8.0
 
 - 
setDescriptionURLpublic void setDescriptionURL(String value) 
 - 
getDescriptionURLpublic String getDescriptionURL() 
 - 
getSCPDDatapublic byte[] getSCPDData() 
 - 
getActionListpublic ActionList getActionList() 
 - 
addActionpublic void addAction(Action a) 
 - 
getServiceStateTablepublic ServiceStateTable getServiceStateTable() 
 - 
getStateVariablepublic StateVariable getStateVariable(String name) 
 - 
hasStateVariablepublic boolean hasStateVariable(String name) 
 - 
isServicepublic boolean isService(String name) 
 - 
announcepublic void announce(String bindAddr) 
 - 
byebyepublic void byebye(String bindAddr) 
 - 
serviceSearchResponsepublic boolean serviceSearchResponse(SSDPPacket ssdpPacket) 
 - 
setQueryListenerpublic void setQueryListener(QueryListener queryListener) 
 - 
getSubscriberListpublic SubscriberList getSubscriberList() 
 - 
addSubscriberpublic void addSubscriber(Subscriber sub) 
 - 
removeSubscriberpublic void removeSubscriber(Subscriber sub) 
 - 
getSubscriberpublic Subscriber getSubscriber(String name) 
 - 
notifypublic void notify(StateVariable stateVar) 
 - 
notifyAllStateVariablespublic void notifyAllStateVariables() 
 - 
getSIDpublic String getSID() 
 - 
setSIDpublic void setSID(String id) 
 - 
clearSIDpublic void clearSID() 
 - 
hasSIDpublic boolean hasSID() 
 - 
isSubscribedpublic boolean isSubscribed() 
 - 
getTimeoutpublic long getTimeout() 
 - 
setTimeoutpublic void setTimeout(long value) 
 - 
setActionListenerpublic void setActionListener(ActionListener listener) 
 - 
addStateVariablepublic void addStateVariable(StateVariable var) Add the StateVariable to the service.
 
 Note: This method should be used to create a dynamic
 Device withtout writing any XML that describe the device
 .
 Note: that no control for duplicate StateVariable is done.- Parameters:
- var- StateVariable that will be added
 
 - 
setUserDatapublic void setUserData(Object data) 
 - 
getUserDatapublic Object getUserData() 
 
- 
 
-