java.lang.Object
org.cybergarage.upnp.device.USN
Utility class for SSDP USN (Unique Service Name) header values and parsing.
This class provides constants and utility methods for handling USN header used in SSDP messages. The USN header provides a unique identifier for devices and services in UPnP networks.
Key features:
- Root device USN validation
- UDN (Unique Device Name) extraction
- USN parsing and manipulation
- UTF-8 encoding support
- Null-safe value handling
This class is used by SSDP components to parse and validate USN headers in discovery and advertisement messages, enabling proper device identification and service differentiation in UPnP networks.
Field Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptionUSN()The USN constants and theisRootDevice(String)test below are static, so an instance carries nothing.Method Summary
All MethodsModifier and TypeMethodDescriptionstatic final StringExtracts the UDN portion of a USN string, the part before the "::" separator.static final booleanisRootDevice(String usnValue) Tests whether a USN string names the root device.
Field Details
ROOTDEVICE
The USN suffix naming the root device.- See Also:
Constructor Details
USN
public USN()The USN constants and theisRootDevice(String)test below are static, so an instance carries nothing.
Method Details
isRootDevice
Tests whether a USN string names the root device.- Parameters:
usnValue- a USN string of the form "uuid::upnp:rootdevice"- Returns:
- true if the value names the root device, false for a null value or another device type
getUDN