org.cybergarage.upnp.ssdp

## Class SSDP

- java.lang.Object
- - org.cybergarage.upnp.ssdp.SSDP

-     public class SSDP
      extends Object

  Constants and utility methods for Simple Service Discovery Protocol (SSDP).
  This class defines SSDP protocol constants including multicast addresses, ports, and utility methods for parsing SSDP cache control headers.
  Version:
    1.8

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ADDRESS` Default IPv4 multicast address for SSDP messages
    `static int` | `DEFAULT_MSEARCH_MX` Default MX (Maximum wait time) for M-SEARCH requests in seconds
    `static String` | `IPV6_ADMINISTRATIVE_ADDRESS` IPv6 administrative multicast address for SSDP messages
    `static String` | `IPV6_GLOBAL_ADDRESS` IPv6 global multicast address for SSDP messages
    `static String` | `IPV6_LINK_LOCAL_ADDRESS` IPv6 link-local multicast address for SSDP messages
    `static String` | `IPV6_SITE_LOCAL_ADDRESS` IPv6 site-local multicast address for SSDP messages
    `static String` | `IPV6_SUBNET_ADDRESS` IPv6 subnet-local multicast address for SSDP messages
    `static int` | `PORT` Default destination port for SSDP multicast messages
    `static int` | `RECV_MESSAGE_BUFSIZE` Buffer size for receiving SSDP messages in bytes

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SSDP()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getIPv6Address()` Gets the currently configured IPv6 multicast address for SSDP operations.
    `static int` | `getLeaseTime(String cacheCont)` Extracts the lease time (max-age) from a Cache-Control header string.
    `static void` | `setIPv6Address(String addr)` Sets the IPv6 multicast address to use for SSDP operations.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ADDRESS

          public static final String ADDRESS

      Default IPv4 multicast address for SSDP messages
      See Also:
        Constant Field Values

    - #### DEFAULT_MSEARCH_MX

          public static final int DEFAULT_MSEARCH_MX

      Default MX (Maximum wait time) for M-SEARCH requests in seconds
      See Also:
        Constant Field Values

    - #### IPV6_ADMINISTRATIVE_ADDRESS

          public static final String IPV6_ADMINISTRATIVE_ADDRESS

      IPv6 administrative multicast address for SSDP messages
      See Also:
        Constant Field Values

    - #### IPV6_GLOBAL_ADDRESS

          public static final String IPV6_GLOBAL_ADDRESS

      IPv6 global multicast address for SSDP messages
      See Also:
        Constant Field Values

    - #### IPV6_LINK_LOCAL_ADDRESS

          public static final String IPV6_LINK_LOCAL_ADDRESS

      IPv6 link-local multicast address for SSDP messages
      See Also:
        Constant Field Values

    - #### IPV6_SITE_LOCAL_ADDRESS

          public static final String IPV6_SITE_LOCAL_ADDRESS

      IPv6 site-local multicast address for SSDP messages
      See Also:
        Constant Field Values

    - #### IPV6_SUBNET_ADDRESS

          public static final String IPV6_SUBNET_ADDRESS

      IPv6 subnet-local multicast address for SSDP messages
      See Also:
        Constant Field Values

    - #### PORT

          public static final int PORT

      Default destination port for SSDP multicast messages
      See Also:
        Constant Field Values

    - #### RECV_MESSAGE_BUFSIZE

          public static final int RECV_MESSAGE_BUFSIZE

      Buffer size for receiving SSDP messages in bytes
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SSDP

          public SSDP()

  - ### Method Detail

    - #### getIPv6Address

          public static final String getIPv6Address()

      Gets the currently configured IPv6 multicast address for SSDP operations.
      Returns:
        the IPv6 address being used

    - #### getLeaseTime

          public static final int getLeaseTime(String cacheCont)

      Extracts the lease time (max-age) from a Cache-Control header string. Parses the max-age directive value from SSDP cache control headers.
      Parameters:
        `cacheCont` - the Cache-Control header content to parse
      Returns:
        the lease time in seconds, or 0 if not found or invalid

    - #### setIPv6Address

          public static final void setIPv6Address(String addr)

      Sets the IPv6 multicast address to use for SSDP operations.
      Parameters:
        `addr` - the IPv6 address to use