java.lang.Object
org.cybergarage.upnp.device.ST
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
FieldsModifier and TypeFieldDescriptionstatic final StringSearch target matching every device on the network.static final StringSearch target matching the root device only.static final StringPrefix of device type URNs, up to the device's type.static final StringPrefix of service type URNs, up to the service's type.static final StringPrefix of search targets naming a device by UUID.Constructor Summary
ConstructorsConstructorDescriptionST()The search-target constants and the matching tests below are all static, so an instance carries nothing.Method Summary
All MethodsModifier and TypeMethodDescriptionstatic final booleanisAllDevice(String value) Returns whether the search target matches every device.static final booleanisRootDevice(String value) Returns whether the search target names the root device.static final booleanisURNDevice(String value) Returns whether the search target is a device type URN.static final booleanisURNService(String value) Returns whether the search target is a service type URN.static final booleanisUUIDDevice(String value) Returns whether the search target names a device by UUID.
Field Details
ALL_DEVICE
Search target matching every device on the network.- See Also:
ROOT_DEVICE
Search target matching the root device only.- See Also:
UUID_DEVICE
Prefix of search targets naming a device by UUID.- See Also:
URN_DEVICE
Prefix of device type URNs, up to the device's type.- See Also:
URN_SERVICE
Prefix of service type URNs, up to the service's type.- See Also:
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
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
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
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
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
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