org.fourthline.cling.model

## Class ServiceReference

- java.lang.Object
- - org.fourthline.cling.model.ServiceReference

-     public class ServiceReference
      extends Object

  Combines a `UDN` and a `ServiceId`.

  A service reference is useful to remember a service. For example, if a control point has accessed a service once, it can remember the service with `Service.getReference()`. Before every action invocation, it can now resolve the reference to an actually registered service with `Registry.getService(ServiceReference)`. If the registry doesn't return a service for the given reference, the service is currently not available.

  This simplifies implementing disconnect/reconnect behavior in a control point.

  Author:
    Christian Bauer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DELIMITER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceReference(String s)`
    `ServiceReference(UDN udn, ServiceId serviceId)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `ServiceId` | `getServiceId()`
    `UDN` | `getUdn()`
    `int` | `hashCode()`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DELIMITER

          public static final String DELIMITER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ServiceReference

          public ServiceReference(String s)

    - #### ServiceReference

          public ServiceReference(UDN udn,
                                  ServiceId serviceId)

  - ### Method Detail

    - #### getUdn

          public UDN getUdn()

    - #### getServiceId

          public ServiceId getServiceId()

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015 4th Line GmbH, Switzerland. All rights reserved.