|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.tm4j.net.LocatorFactoryBase
A basic implementation of the LocatorFactory interface
with the createLocator() method implemented.
| Constructor Summary | |
LocatorFactoryBase()
|
|
| Method Summary | |
Locator |
createLocator(java.lang.String notation,
java.lang.String address)
Creates a new locator. |
abstract java.lang.Class |
getImplementation(java.lang.String notation)
Retrieves the implementation class associated with the specified notation. |
abstract void |
registerImplementation(java.lang.String notation,
java.lang.Class cls)
Registers a locator implementation. |
void |
registerImplementation(java.lang.String notation,
java.lang.String className)
Registers a locator implementation. |
abstract void |
removeImplementation(java.lang.Class cls)
Unregisters a locator implementation. |
void |
removeImplementation(java.lang.String className)
Unregisters a locator implementation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LocatorFactoryBase()
| Method Detail |
public abstract void registerImplementation(java.lang.String notation,
java.lang.Class cls)
LocatorFactoryLocatorFactory.createLocator(String, String).
registerImplementation in interface LocatorFactorynotation - the notation to be associated with the implementation.cls - the class that represents the actual locator
implementation. This class must implement
the Locator interface.
public void registerImplementation(java.lang.String notation,
java.lang.String className)
throws java.lang.ClassNotFoundException
createLocator(String, String).
notation - the notation to be associated with the implementation.className - the fully-qualified name of the class that
represents the actual locator implementation.
That class must implement the Locator interface.
java.lang.ClassNotFoundException - if no class with the specified
name could be found.public abstract void removeImplementation(java.lang.Class cls)
LocatorFactoryLocatorFactory.createLocator(String, String).
removeImplementation in interface LocatorFactorycls - the class that represents the locator
implementation to be removed. If this class
has not yet been registered, it is silently ignored.
public void removeImplementation(java.lang.String className)
throws java.lang.ClassNotFoundException
createLocator(String, String).
className - the fully-qualified name of the class that represents the locator
implementation to be removed. If this class
has not yet been registered, it is silently ignored.
java.lang.ClassNotFoundException - if no class with the specified
name could be found.
public abstract java.lang.Class getImplementation(java.lang.String notation)
throws LocatorFactoryException
notation - the notation whose associated implementation class
is to be retrieved.
notation.
LocatorFactoryException - If no locator implementation
class associated with notation
has yet been registered.
public Locator createLocator(java.lang.String notation,
java.lang.String address)
throws LocatorFactoryException
registerImplementation(String, Class). When creating
a locator, this method performs the following steps:
getImplementation(String) to retrieve the
locator implementation class associated with notation. If this
fails, an exception is thrown.(LocatorFactory, String, String)
constructor on the locator implementation and thereby creates a locator owned
by the invoking factory, containing notation and
address as its notation and address, respectively. If
such a constructor cannot be found, an exception is thrown.
createLocator in interface LocatorFactorynotation - the notation to be associated with the new locator.address - the address to be associated with the new locator.
LocatorFactoryException - If no locator implementation
class associated with notation
has yet been registered, or an unexpected
condition occurred during locator
instantiation.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||