java.lang.Object
org.cybergarage.upnp.device.ST

public class STextends Object
Utility class for SSDP ST (Search Target) header values and validation.

This class provides constants and utility methods for handling ST header used in SSDP M-SEARCH requests and responses. The ST header specifies the search target for device discovery operations.

Key features:

  • Search target constants for different device types
  • All device search support
  • Root device detection
  • UUID-based device identification
  • URN device and service validation
  • Quoted and unquoted value support

This class is used by SSDP components to validate and process ST headers in search requests and responses, enabling targeted device discovery and proper search target classification.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Search target matching every device on the network.
    static final String
    Search target matching the root device only.
    static final String
    Prefix of device type URNs, up to the device's type.
    static final String
    Prefix of service type URNs, up to the service's type.
    static final String
    Prefix of search targets naming a device by UUID.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ST()
    The search-target constants and the matching tests below are all static, so an instance carries nothing.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    static final boolean
    Returns whether the search target matches every device.
    static final boolean
    Returns whether the search target names the root device.
    static final boolean
    Returns whether the search target is a device type URN.
    static final boolean
    Returns whether the search target is a service type URN.
    static final boolean
    Returns whether the search target names a device by UUID.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ST

      public ST()
      The search-target constants and the matching tests below are all static, so an instance carries nothing.
  • Method Details

    • isAllDevice

      public static final boolean isAllDevice(String value)
      Returns whether the search target matches every device.
      Parameters:
      value - the UPnP search target to test, quoted or unquoted
      Returns:
      true if the target matches the all-device search target
    • isRootDevice

      public static final boolean isRootDevice(String value)
      Returns whether the search target names the root device.
      Parameters:
      value - the UPnP search target to test, quoted or unquoted
      Returns:
      true if the target matches the root-device search target
    • isUUIDDevice

      public static final boolean isUUIDDevice(String value)
      Returns whether the search target names a device by UUID.
      Parameters:
      value - the UPnP search target to test, quoted or unquoted
      Returns:
      true if the target begins with the UUID-device search target
    • isURNDevice

      public static final boolean isURNDevice(String value)
      Returns whether the search target is a device type URN.
      Parameters:
      value - the UPnP search target to test, quoted or unquoted
      Returns:
      true if the target begins with the device URN prefix
    • isURNService

      public static final boolean isURNService(String value)
      Returns whether the search target is a service type URN.
      Parameters:
      value - the UPnP search target to test, quoted or unquoted
      Returns:
      true if the target begins with the service URN prefix