Service

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.tv.service
Interface Service

All Known Subinterfaces:
  AbstractService, OcapRecordedService, RecordedService, RemoteService, SegmentedRecordedService

    public interface Service

The `Service` interface represents an abstract view on what is generally referred to as a television "service" or "channel". It may represent an MPEG-2 program, DVB service, an ATSC virtual channel, SCTE virtual channel, etc. It represents the basic information associated with a service, such as its name or number, which is guaranteed to be available on the receiver.

Internal to the receiver, each service is uniquely identified by information that may include system type, network ID, transport stream ID, service number, service number, or other information. This identification is encapsulated by the Locator object.

Note that a `Service` object may represent multiple instances of the same content delivered over different media (e.g., the same service may be delivered over a terrestrial and cable network). A `ServiceDetails` object represents a specific instance of such content which is bound to a specific delivery mechanism.

The information available through this object, i.e., the service name, service number, etc., represents information that is stored in the receiver and is not necessarily the same as what is broadcast in any broadcast service information protocol. For example, a receiver implementation may let the end user edit this information according to the user's preferences.

A `Service` object may optionally implement an interface that supports service numbers. Each `Service` object must provide either a service name (via the `getName` method) or a service number (via the `ServiceNumber` interface).

See Also:
  `getName()`, `ServiceNumber`, `ServiceDetails`, Optionally implemented interfaces

Method Summary
`boolean` | `equals(Object obj)` Tests two `Service` objects for equality.
`Locator` | `getLocator()` Reports the `Locator` of this `Service`.
`String` | `getName()` Returns a short service name or acronym.
`ServiceType` | `getServiceType()` Returns the type of this service, (for example, "digital television", "digital radio", "NVOD", etc.) These values can be mapped to the ATSC service type in the VCT table and the DVB service type in the service descriptor.
`int` | `hashCode()` Reports the hash code value of this `Service`.
`boolean` | `hasMultipleInstances()` This method indicates whether the service represented by this `Service` object is available on multiple transports, (e.g., the same content delivered over terrestrial and cable network).
`SIRequest` | `retrieveDetails(SIRequestor requestor)` This method retrieves additional information about the `Service`.

Method Detail

### retrieveDetails

    SIRequest retrieveDetails(SIRequestor requestor)

  This method retrieves additional information about the `Service`. This information is retrieved from the broadcast service information.

  Note that if the content represented by this `Service` is delivered on multiple transport-dependent streams there may be multiple `ServiceDetails` for it. This method retrieves one of them based on availability or user preferences. If access to all possible `ServiceDetails` is required, the service `Locator` can be transformed to transport-dependent `Locator` instances and `ServiceDetails` can be retrieved for each.

  This method returns data asynchronously.

  Parameters:
    `requestor` - The `SIRequestor` to be notified when this retrieval operation completes.
  Returns:
    An `SIRequest` object identifying this asynchronous retrieval request.
  See Also:
    `Locator`, `ServiceDetails`

### getName

    String getName()

  Returns a short service name or acronym. For example, in ATSC systems the service name is provided by the the PSIP VCT; in DVB systems, this information is provided by the DVB Service Descriptor or the Multilingual Service Name Descriptor. The service name may also be user-defined.

  Returns:
    A string representing this service's short name. If the short name is unavailable, the string representation of the service number is returned.

### hasMultipleInstances

    boolean hasMultipleInstances()

  This method indicates whether the service represented by this `Service` object is available on multiple transports, (e.g., the same content delivered over terrestrial and cable network).

  Returns:
    `true` if multiple transports carry the same content identified by this `Service` object; `false` if there is only one instance of this service.

### getServiceType

    ServiceType getServiceType()

  Returns the type of this service, (for example, "digital television", "digital radio", "NVOD", etc.) These values can be mapped to the ATSC service type in the VCT table and the DVB service type in the service descriptor.

  Returns:
    Service type of this `Service`.

### getLocator

    Locator getLocator()

  Reports the `Locator` of this `Service`. Note that if the resulting locator is transport-dependent, it will also correspond to a `ServiceDetails` object.

  Returns:
    A locator referencing this `Service`.
  See Also:
    `ServiceDetails`

### equals

    boolean equals(Object obj)

  Tests two `Service` objects for equality. Returns `true` if and only if:
  - `obj`'s class is the same as the class of this `Service`, and

  - `obj`'s `Locator` is equal to the `Locator` of this `Service` (as reported by `Service.getLocator()`, and

  - `obj` and this object encapsulate identical data.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `obj` - The object against which to test for equality.
  Returns:
    `true` if the two `Service` objects are equal; `false` otherwise.
  See Also:
    `Object.hashCode()`, `Hashtable`

### hashCode

    int hashCode()

  Reports the hash code value of this `Service`. Two `Service` objects that are equal will have identical hash codes.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    The hash code value of this `Service`.
  See Also:
    `Object.equals(java.lang.Object)`, `Hashtable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD