org.dvb.locator.ip
Class MulticastLocator

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

public class MulticastLocator
extends Locator

Represents a reference to an IP service accessed by an IGMP join request.


Constructor Summary
MulticastLocator(java.net.InetAddress address, int port)
          Creates a MulticastLocator from the specified URL.
MulticastLocator(java.net.InetAddress address, int port, int serviceID)
          Creates a MulticastLocator from the specified URL.
 
Method Summary
 int getServiceID()
          Returns the serviceID specified when this MulticastLocator 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

MulticastLocator

public MulticastLocator(java.net.InetAddress address,
                        int port)
                 throws java.net.MalformedURLException
Creates a MulticastLocator from the specified URL.

Parameters:
address - the multicast address to join
port - the port to join
Throws:
java.net.MalformedURLException - if the address is not a multicast address

MulticastLocator

public MulticastLocator(java.net.InetAddress address,
                        int port,
                        int serviceID)
                 throws java.net.MalformedURLException,
                        java.lang.IllegalArgumentException
Creates a MulticastLocator from the specified URL.

Parameters:
address - the multicast address to join
port - the port to join
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 address is not a multicast address
java.lang.IllegalArgumentException - if the service ID is less than 0 or greater than 0xffff
Method Detail

getServiceID

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

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