Package org.cybergarage.upnp
Class Service
java.lang.Object
org.cybergarage.upnp.Service
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd the StateVariable to the service.
Note: This method should be used to create a dynamic
Device withtout writing any XML that describe the device
.voidaddSubscriber(Subscriber sub) voidvoidvoidclearSID()intbyte[]getSID()getStateVariable(String name) getSubscriber(String name) longbooleanhasSID()booleanhasStateVariable(String name) booleanisControlURL(String url) booleanisEventSubURL(String url) booleanbooleanstatic booleanisServiceNode(Node node) booleanbooleanbooleanloadSCPD(InputStream input) booleanvoidlock()voidnotify(StateVariable stateVar) voidvoidbooleanserviceSearchResponse(SSDPPacket ssdpPacket) voidsetActionListener(ActionListener listener) voidsetControlURL(String value) voidsetDescriptionURL(String value) voidsetEventSubURL(String value) voidsetQueryListener(QueryListener queryListener) voidsetSCPDURL(String value) voidsetServiceID(String value) voidsetServiceType(String value) voidvoidsetTimeout(long value) voidsetUserData(Object data) voidunlock()void
-
Field Details
-
ELEM_NAME
- See Also:
-
SCPD_ROOTNODE
- See Also:
-
SCPD_ROOTNODE_NS
- See Also:
-
SPEC_VERSION
- See Also:
-
MAJOR
- See Also:
-
MAJOR_VALUE
- See Also:
-
MINOR
- See Also:
-
MINOR_VALUE
- See Also:
-
-
Constructor Details
-
Service
public Service() -
Service
-
-
Method Details
-
getServiceNode
-
lock
public void lock() -
unlock
public void unlock() -
isServiceNode
-
getDevice
-
getRootDevice
-
setServiceType
-
getServiceType
-
setServiceID
-
getServiceID
-
updateConfigId
public void updateConfigId() -
getConfigId
public int getConfigId() -
setSCPDURL
-
getSCPDURL
-
isSCPDURL
-
setControlURL
-
getControlURL
-
isControlURL
-
setEventSubURL
-
getEventSubURL
-
isEventSubURL
-
loadSCPD
- Throws:
InvalidDescriptionException
-
loadSCPD
- Throws:
ParserException
-
loadSCPD
- Throws:
ParserException- Since:
- 1.8.0
-
setDescriptionURL
-
getDescriptionURL
-
getSCPDData
public byte[] getSCPDData() -
getActionList
-
getAction
-
addAction
-
getServiceStateTable
-
getStateVariable
-
hasStateVariable
-
isService
-
announce
-
byebye
-
serviceSearchResponse
-
setQueryListener
-
getSubscriberList
-
addSubscriber
-
removeSubscriber
-
getSubscriber
-
notify
-
notifyAllStateVariables
public void notifyAllStateVariables() -
getSID
-
setSID
-
clearSID
public void clearSID() -
hasSID
public boolean hasSID() -
isSubscribed
public boolean isSubscribed() -
getTimeout
public long getTimeout() -
setTimeout
public void setTimeout(long value) -
setActionListener
-
addStateVariable
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
-
getUserData
-