org.cybergarage.upnp
Class Device
java.lang.Object
org.cybergarage.upnp.Device
- All Implemented Interfaces:
- HTTPRequestListener, SearchListener
public class Device
- extends java.lang.Object
- implements HTTPRequestListener, SearchListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ELEM_NAME
public static final java.lang.String ELEM_NAME
- See Also:
- Constant Field Values
UPNP_ROOTDEVICE
public static final java.lang.String UPNP_ROOTDEVICE
- See Also:
- Constant Field Values
DEFAULT_STARTUP_WAIT_TIME
public static final int DEFAULT_STARTUP_WAIT_TIME
- See Also:
- Constant Field Values
DEFAULT_DISCOVERY_WAIT_TIME
public static final int DEFAULT_DISCOVERY_WAIT_TIME
- See Also:
- Constant Field Values
DEFAULT_LEASE_TIME
public static final int DEFAULT_LEASE_TIME
- See Also:
- Constant Field Values
HTTP_DEFAULT_PORT
public static final int HTTP_DEFAULT_PORT
- See Also:
- Constant Field Values
DEFAULT_DESCRIPTION_URI
public static final java.lang.String DEFAULT_DESCRIPTION_URI
- See Also:
- Constant Field Values
Device
public Device(Node root,
Node device)
Device
public Device()
Device
public Device(Node device)
Device
public Device(java.io.File descriptionFile)
throws InvalidDescriptionException
- Throws:
InvalidDescriptionException
Device
public Device(java.lang.String descriptionFileName)
throws InvalidDescriptionException
- Throws:
InvalidDescriptionException
getRootNode
public Node getRootNode()
getDeviceNode
public Node getDeviceNode()
setRootNode
public void setRootNode(Node node)
setDeviceNode
public void setDeviceNode(Node node)
lock
public void lock()
unlock
public void unlock()
setNMPRMode
public void setNMPRMode(boolean flag)
isNMPRMode
public boolean isNMPRMode()
setWirelessMode
public void setWirelessMode(boolean flag)
isWirelessMode
public boolean isWirelessMode()
getSSDPAnnounceCount
public int getSSDPAnnounceCount()
getRootDevice
public Device getRootDevice()
getParentDevice
public Device getParentDevice()
getDescriptionFile
public java.io.File getDescriptionFile()
getDescriptionFilePath
public java.lang.String getDescriptionFilePath()
loadDescription
public boolean loadDescription(java.lang.String descString)
throws InvalidDescriptionException
- Throws:
InvalidDescriptionException
loadDescription
public boolean loadDescription(java.io.File file)
throws InvalidDescriptionException
- Throws:
InvalidDescriptionException
isDeviceNode
public static boolean isDeviceNode(Node node)
isRootDevice
public boolean isRootDevice()
setSSDPPacket
public void setSSDPPacket(SSDPPacket packet)
getSSDPPacket
public SSDPPacket getSSDPPacket()
setLocation
public void setLocation(java.lang.String value)
getLocation
public java.lang.String getLocation()
setLeaseTime
public void setLeaseTime(int value)
getLeaseTime
public int getLeaseTime()
getTimeStamp
public long getTimeStamp()
getElapsedTime
public long getElapsedTime()
isExpired
public boolean isExpired()
getURLBase
public java.lang.String getURLBase()
setDeviceType
public void setDeviceType(java.lang.String value)
getDeviceType
public java.lang.String getDeviceType()
isDeviceType
public boolean isDeviceType(java.lang.String value)
setFriendlyName
public void setFriendlyName(java.lang.String value)
getFriendlyName
public java.lang.String getFriendlyName()
setManufacture
public void setManufacture(java.lang.String value)
getManufacture
public java.lang.String getManufacture()
setManufactureURL
public void setManufactureURL(java.lang.String value)
getManufactureURL
public java.lang.String getManufactureURL()
setModelDescription
public void setModelDescription(java.lang.String value)
getModelDescription
public java.lang.String getModelDescription()
setModelName
public void setModelName(java.lang.String value)
getModelName
public java.lang.String getModelName()
setModelNumber
public void setModelNumber(java.lang.String value)
getModelNumber
public java.lang.String getModelNumber()
setModelURL
public void setModelURL(java.lang.String value)
getModelURL
public java.lang.String getModelURL()
setSerialNumber
public void setSerialNumber(java.lang.String value)
getSerialNumber
public java.lang.String getSerialNumber()
setUDN
public void setUDN(java.lang.String value)
getUDN
public java.lang.String getUDN()
hasUDN
public boolean hasUDN()
setUPC
public void setUPC(java.lang.String value)
getUPC
public java.lang.String getUPC()
setPresentationURL
public void setPresentationURL(java.lang.String value)
getPresentationURL
public java.lang.String getPresentationURL()
getDeviceList
public DeviceList getDeviceList()
isDevice
public boolean isDevice(java.lang.String name)
getDevice
public Device getDevice(java.lang.String name)
getDeviceByDescriptionURI
public Device getDeviceByDescriptionURI(java.lang.String uri)
getServiceList
public ServiceList getServiceList()
getService
public Service getService(java.lang.String name)
getServiceBySCPDURL
public Service getServiceBySCPDURL(java.lang.String searchUrl)
getServiceByControlURL
public Service getServiceByControlURL(java.lang.String searchUrl)
getServiceByEventSubURL
public Service getServiceByEventSubURL(java.lang.String searchUrl)
getSubscriberService
public Service getSubscriberService(java.lang.String uuid)
getStateVariable
public StateVariable getStateVariable(java.lang.String serviceType,
java.lang.String name)
getStateVariable
public StateVariable getStateVariable(java.lang.String name)
getAction
public Action getAction(java.lang.String name)
getIconList
public IconList getIconList()
getIcon
public Icon getIcon(int n)
getLocationURL
public java.lang.String getLocationURL(java.lang.String host)
notifyWait
public static final void notifyWait()
announce
public void announce(java.lang.String bindAddr)
announce
public void announce()
byebye
public void byebye(java.lang.String bindAddr)
byebye
public void byebye()
postSearchResponse
public boolean postSearchResponse(SSDPPacket ssdpPacket,
java.lang.String st,
java.lang.String usn)
deviceSearchResponse
public void deviceSearchResponse(SSDPPacket ssdpPacket)
deviceSearchReceived
public void deviceSearchReceived(SSDPPacket ssdpPacket)
- Specified by:
deviceSearchReceived
in interface SearchListener
setHTTPPort
public void setHTTPPort(int port)
getHTTPPort
public int getHTTPPort()
httpRequestRecieved
public void httpRequestRecieved(HTTPRequest httpReq)
- Specified by:
httpRequestRecieved
in interface HTTPRequestListener
start
public boolean start()
stop
public boolean stop()
getInterfaceAddress
public java.lang.String getInterfaceAddress()
setActionListener
public void setActionListener(ActionListener listener)
setQueryListener
public void setQueryListener(QueryListener listener)
setActionListener
public void setActionListener(ActionListener listener,
boolean includeSubDevices)
setQueryListener
public void setQueryListener(QueryListener listener,
boolean includeSubDevices)