org.cybergarage.upnp
Class Service
java.lang.Object
org.cybergarage.upnp.Service
public class Service
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ELEM_NAME
public static final String ELEM_NAME
- See Also:
- Constant Field Values
SCPD_ROOTNODE
public static final String SCPD_ROOTNODE
- See Also:
- Constant Field Values
SCPD_ROOTNODE_NS
public static final String SCPD_ROOTNODE_NS
- See Also:
- Constant Field Values
SPEC_VERSION
public static final String SPEC_VERSION
- See Also:
- Constant Field Values
MAJOR
public static final String MAJOR
- See Also:
- Constant Field Values
MAJOR_VALUE
public static final String MAJOR_VALUE
- See Also:
- Constant Field Values
MINOR
public static final String MINOR
- See Also:
- Constant Field Values
MINOR_VALUE
public static final String MINOR_VALUE
- See Also:
- Constant Field Values
Service
public Service()
Service
public Service(Node node)
getServiceNode
public Node getServiceNode()
lock
public void lock()
unlock
public void unlock()
isServiceNode
public static boolean isServiceNode(Node node)
getDevice
public Device getDevice()
getRootDevice
public Device getRootDevice()
setServiceType
public void setServiceType(String value)
getServiceType
public String getServiceType()
setServiceID
public void setServiceID(String value)
getServiceID
public String getServiceID()
setSCPDURL
public void setSCPDURL(String value)
getSCPDURL
public String getSCPDURL()
isSCPDURL
public boolean isSCPDURL(String url)
setControlURL
public void setControlURL(String value)
getControlURL
public String getControlURL()
isControlURL
public boolean isControlURL(String url)
setEventSubURL
public void setEventSubURL(String value)
getEventSubURL
public String getEventSubURL()
isEventSubURL
public boolean isEventSubURL(String url)
loadSCPD
public boolean loadSCPD(String scpdStr)
throws InvalidDescriptionException
- Throws:
InvalidDescriptionException
loadSCPD
public boolean loadSCPD(File file)
throws ParserException
- Throws:
ParserException
loadSCPD
public boolean loadSCPD(InputStream input)
throws ParserException
- Throws:
ParserException
- Since:
- 1.8.0
setDescriptionURL
public void setDescriptionURL(String value)
getDescriptionURL
public String getDescriptionURL()
getSCPDData
public byte[] getSCPDData()
getActionList
public ActionList getActionList()
getAction
public Action getAction(String actionName)
addAction
public void addAction(Action a)
getServiceStateTable
public ServiceStateTable getServiceStateTable()
getStateVariable
public StateVariable getStateVariable(String name)
hasStateVariable
public boolean hasStateVariable(String name)
isService
public boolean isService(String name)
announce
public void announce(String bindAddr)
byebye
public void byebye(String bindAddr)
serviceSearchResponse
public boolean serviceSearchResponse(SSDPPacket ssdpPacket)
setQueryListener
public void setQueryListener(QueryListener queryListener)
getSubscriberList
public SubscriberList getSubscriberList()
addSubscriber
public void addSubscriber(Subscriber sub)
removeSubscriber
public void removeSubscriber(Subscriber sub)
getSubscriber
public Subscriber getSubscriber(String name)
notify
public void notify(StateVariable stateVar)
notifyAllStateVariables
public void notifyAllStateVariables()
getSID
public String getSID()
setSID
public void setSID(String id)
clearSID
public void clearSID()
hasSID
public boolean hasSID()
isSubscribed
public boolean isSubscribed()
getTimeout
public long getTimeout()
setTimeout
public void setTimeout(long value)
setActionListener
public void setActionListener(ActionListener listener)
addStateVariable
public 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
setUserData
public void setUserData(Object data)
getUserData
public Object getUserData()
Copyright © 2009 DomoWare. All Rights Reserved.