Class Device

    • Method Detail

      • 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()
      • getAbsoluteURL

        public String getAbsoluteURL​(String urlString)
      • setNMPRMode

        public void setNMPRMode​(boolean flag)
      • isNMPRMode

        public boolean isNMPRMode()
      • setWirelessMode

        public void setWirelessMode​(boolean flag)
      • isWirelessMode

        public boolean isWirelessMode()
      • getSSDPAnnounceCount

        public int getSSDPAnnounceCount()
      • getUUID

        public String getUUID()
      • getBootId

        public int getBootId()
      • updateConfigId

        public void updateConfigId()
      • getConfigId

        public int getConfigId()
      • getRootDevice

        public Device getRootDevice()
      • getParentDevice

        public Device getParentDevice()
        Returns:
        A Device that contain this object.
        Return null if this is a root device.
      • addService

        public void addService​(Service s)
        Add a Service to device without checking for duplicate or syntax error
        Parameters:
        s - Add Service s to the Device
      • addDevice

        public void addDevice​(Device d)
        Add a Device to device without checking for duplicate or syntax error. This method set or reset the root node of the Device and itself

        Note: This method should be used to create a dynamic
        Device withtout writing any XML that describe the device
        Parameters:
        d - Add Device d to the Device
      • getDescriptionFile

        public File getDescriptionFile()
      • getDescriptionFilePath

        public String getDescriptionFilePath()
      • isDeviceNode

        public static boolean isDeviceNode​(Node node)
      • isRootDevice

        public boolean isRootDevice()
      • setSSDPPacket

        public void setSSDPPacket​(SSDPPacket packet)
      • getSSDPPacket

        public SSDPPacket getSSDPPacket()
      • getSSDPPacket

        public SSDPPacket getSSDPPacket​(boolean preferIPv6)
        I2P for multiple location support
        Since:
        0.9.50
      • setLocation

        public void setLocation​(String value)
      • getLocation

        public String getLocation()
      • getLocation

        public String getLocation​(boolean preferIPv6)
        I2P for multiple location support
        Since:
        0.9.50
      • setLeaseTime

        public void setLeaseTime​(int value)
      • getLeaseTime

        public int getLeaseTime()
      • getTimeStamp

        public long getTimeStamp()
      • getElapsedTime

        public long getElapsedTime()
      • isExpired

        public boolean isExpired()
      • getURLBase

        public String getURLBase()
      • setDeviceType

        public void setDeviceType​(String value)
      • getDeviceType

        public String getDeviceType()
      • isDeviceType

        public boolean isDeviceType​(String value)
      • setFriendlyName

        public void setFriendlyName​(String value)
      • getFriendlyName

        public String getFriendlyName()
      • setManufacture

        public void setManufacture​(String value)
      • getManufacture

        public String getManufacture()
      • setManufactureURL

        public void setManufactureURL​(String value)
      • getManufactureURL

        public String getManufactureURL()
      • setModelDescription

        public void setModelDescription​(String value)
      • getModelDescription

        public String getModelDescription()
      • setModelName

        public void setModelName​(String value)
      • getModelName

        public String getModelName()
      • setModelNumber

        public void setModelNumber​(String value)
      • getModelNumber

        public String getModelNumber()
      • setModelURL

        public void setModelURL​(String value)
      • getModelURL

        public String getModelURL()
      • setSerialNumber

        public void setSerialNumber​(String value)
      • getSerialNumber

        public String getSerialNumber()
      • setUDN

        public void setUDN​(String value)
      • getUDN

        public String getUDN()
      • hasUDN

        public boolean hasUDN()
      • setUPC

        public void setUPC​(String value)
      • getUPC

        public String getUPC()
      • setPresentationURL

        public void setPresentationURL​(String value)
      • getPresentationURL

        public String getPresentationURL()
      • removePresentationURL

        public boolean removePresentationURL()
      • hasPresentationListener

        public boolean hasPresentationListener()
      • getDeviceList

        public DeviceList getDeviceList()
      • isDevice

        public boolean isDevice​(String name)
      • getDeviceByDescriptionURI

        public Device getDeviceByDescriptionURI​(String uri)
      • getServiceBySCPDURL

        public Service getServiceBySCPDURL​(String searchUrl)
      • getServiceByControlURL

        public Service getServiceByControlURL​(String searchUrl)
      • getServiceByEventSubURL

        public Service getServiceByEventSubURL​(String searchUrl)
      • getSubscriberService

        public Service getSubscriberService​(String uuid)
      • isIconBytesURI

        public boolean isIconBytesURI​(String uri)
      • getIconByURI

        public Icon getIconByURI​(String uri)
      • addIcon

        public boolean addIcon​(Icon icon)
      • getIconList

        public IconList getIconList()
      • getIcon

        public Icon getIcon​(int n)
      • getSmallestIcon

        public Icon getSmallestIcon()
      • getLocationURL

        public String getLocationURL​(String host)
      • notifyWait

        public static final void notifyWait()
      • announce

        public void announce​(String bindAddr)
      • announce

        public void announce()
      • byebye

        public void byebye​(String bindAddr)
      • byebye

        public void byebye()
      • deviceSearchResponse

        public void deviceSearchResponse​(SSDPPacket ssdpPacket)
      • setHTTPPort

        public void setHTTPPort​(int port)
      • getHTTPPort

        public int getHTTPPort()
      • setHTTPBindAddress

        public void setHTTPBindAddress​(InetAddress[] inets)
      • getHTTPBindAddress

        public InetAddress[] getHTTPBindAddress()
      • getSSDPIPv4MulticastAddress

        public String getSSDPIPv4MulticastAddress()
        Returns:
        SSDPIPv4MulticastAddress
        Since:
        1.8
      • getSSDPIPv4MulticastAddress

        public void getSSDPIPv4MulticastAddress​(String ip)
        Parameters:
        ip -
        Since:
        1.8
      • getSSDPIPv6MulticastAddress

        public String getSSDPIPv6MulticastAddress()
        Returns:
        SSDPIPv6MulticastAddress
        Since:
        1.8
      • getSSDPIPv6MulticastAddress

        public void getSSDPIPv6MulticastAddress​(String ip)
        Parameters:
        ip -
        Since:
        1.8
      • setSSDPPort

        public void setSSDPPort​(int port)
        Parameters:
        port - The port to use for binding the SSDP service
      • getSSDPPort

        public int getSSDPPort()
        Returns:
        The port to use for binding the SSDP service
      • setSSDPBindAddress

        public void setSSDPBindAddress​(InetAddress[] inets)
        Parameters:
        inets - The IP that will be used for binding the SSDP service. Use null to get the default beahvior
      • getSSDPBindAddress

        public InetAddress[] getSSDPBindAddress()
        Returns:
        inets The IP that will be used for binding the SSDP service. null means the default setted by the class UPnP
      • setMulticastIPv4Address

        public void setMulticastIPv4Address​(String ip)
        Parameters:
        ip - The IPv4 address used for Multicast comunication
      • getMulticastIPv4Address

        public String getMulticastIPv4Address()
        Returns:
        The IPv4 address used for Multicast comunication
      • setMulticastIPv6Address

        public void setMulticastIPv6Address​(String ip)
        Parameters:
        ip - The IPv address used for Multicast comunication
      • getMulticastIPv6Address

        public String getMulticastIPv6Address()
        Returns:
        The IPv address used for Multicast comunication
      • start

        public boolean start()
      • stop

        public boolean stop()
      • isRunning

        public boolean isRunning()
      • getInterfaceAddress

        public 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)
      • setUserData

        public void setUserData​(Object data)
      • getUserData

        public Object getUserData()