org.dvb.locator.ip
Class UnicastLocator

java.lang.Object
  extended by org.davic.net.Locator
      extended by org.dvb.locator.ip.UnicastLocator
All Implemented Interfaces:
javax.tv.locator.Locator

public class UnicastLocator
extends Locator

Represents a reference to an IP service delivered by unicast UDP where the delivery of the service is not initiated by the implementation. The only requirement on implementations when locators of this type are used is to listen on the specified port number for content to arrive.

The intended use case for this locator is as follows

The external form of this locator is not defined by the present document.


Constructor Summary
UnicastLocator(int port)
          Creates a UnicastLocator from the specified local port number.
UnicastLocator(int port, int serviceID)
          Creates a UnicastLocator from the specified local port number and service ID.
 
Method Summary
 int getPort()
          Returns the port specified when this UnicastLocator was constructed.
 int getServiceID()
          Returns the serviceID specified when this UnicastLocator was constructed.
 
Methods inherited from class org.davic.net.Locator
hasMultipleTransformations, toExternalForm, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.tv.locator.Locator
equals, hashCode
 

Constructor Detail

UnicastLocator

public UnicastLocator(int port)
Creates a UnicastLocator from the specified local port number.

Parameters:
port - the local port number on which the content will be delivered

UnicastLocator

public UnicastLocator(int port,
                      int serviceID)
               throws java.net.MalformedURLException,
                      java.lang.IllegalArgumentException
Creates a UnicastLocator from the specified local port number and service ID.

Parameters:
port - the local port number on which the content will be delivered
serviceID - a DVB-SI serviceID or MPEG program number to identify one service in a multi-program transport stream
Throws:
java.net.MalformedURLException - if the port number is not valid
java.lang.IllegalArgumentException - if the service ID is less than 0 or greater than 0xffff
Method Detail

getPort

public int getPort()
Returns the port specified when this UnicastLocator was constructed.

Returns:
the port specified when this UnicastLocator or -1 if no port was specified

getServiceID

public int getServiceID()
Returns the serviceID specified when this UnicastLocator was constructed.

Returns:
the serviceID specified when this UnicastLocator or -1 if no serviceID was specified