Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.tv.locator
Class LocatorFactory

java.lang.Object
  extended byjavax.tv.locator.LocatorFactory

public abstract class LocatorFactory
extends java.lang.Object

This class defines a factory for the creation of Locator objects.

See Also:
Locator

Constructor Summary
protected LocatorFactory()
          Creates the LocatorFactory instance.
 
Method Summary
abstract  Locator createLocator(java.lang.String locatorString)
          Creates a Locator object from the specified locator string.
static LocatorFactory getInstance()
          Provides an instance of LocatorFactory.
abstract  Locator[] transformLocator(Locator source)
          Transforms a Locator into its respective collection of transport dependent Locator objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorFactory

protected LocatorFactory()
Creates the LocatorFactory instance.

Method Detail

getInstance

public static LocatorFactory getInstance()
Provides an instance of LocatorFactory.

Returns:
A LocatorFactory instance.

createLocator

public abstract Locator createLocator(java.lang.String locatorString)
                               throws MalformedLocatorException
Creates a Locator object from the specified locator string. The format of the locator string may be entirely implementation-specific.

Parameters:
locatorString - The string form of the Locator to be created.
Returns:
A Locator object representing the resource referenced by the given locator string.
Throws:
MalformedLocatorException - If an incorrectly formatted locator string is detected.
See Also:
Locator.toExternalForm()

transformLocator

public abstract Locator[] transformLocator(Locator source)
                                    throws InvalidLocatorException
Transforms a Locator into its respective collection of transport dependent Locator objects. A transformation on a transport dependent Locator results in an identity transformation, i.e. the same locator is returned in a single-element array.

Parameters:
source - The Locator to transform.
Returns:
An array of transport dependent Locator objects for the given Locator.
Throws:
InvalidLocatorException - If source is not a valid Locator.

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.