jtge.engine.data
Class Resolver

java.lang.Object
  extended byjtge.engine.data.Resolver
All Implemented Interfaces:
IResolver

public class Resolver
extends java.lang.Object
implements IResolver

Implements a data identifier resolver.

This class registers data in order to retrieve them later based on their identifier.

Version:
$Revision: 1.3 $ $Date: 2005/08/26 18:09:35 $
Author:
Mathieu Champlon

Constructor Summary
Resolver()
          Create a resolver.
 
Method Summary
 boolean register(IData data)
          Register a new data.
 IData resolve(java.lang.String identifier)
          Retrieve a data based on its identifier.
 boolean unregister(IData data)
          Unregister a data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resolver

public Resolver()
Create a resolver.

Method Detail

register

public final boolean register(IData data)
Register a new data.

The data cannot be registered if another data with the same identifier already exists.

Specified by:
register in interface IResolver
Parameters:
data - the data to register
Returns:
Whether the data has been registered or not

unregister

public final boolean unregister(IData data)
Unregister a data.

The data cannot be unregistered if it has not been previously registered.

Parameters:
data - the data to unregister
Returns:
Whether the data has been unregistered or not

resolve

public final IData resolve(java.lang.String identifier)
Retrieve a data based on its identifier.

Specified by:
resolve in interface IResolver
Parameters:
identifier - the data identifier
Returns:
the matching data or null if none


Copyright © 2003-2005 . All Rights Reserved.