org.molwind.io
Class AbstractWorldLocator

java.lang.Object
  extended by org.molwind.io.AbstractWorldLocator
All Implemented Interfaces:
WorldLocator, Configurable

public abstract class AbstractWorldLocator
extends java.lang.Object
implements WorldLocator, Configurable

AbstractWorldLocator adds logging functionality which can be used by sub-classes.

Version:
1.0
Author:
Oliver Karch

Constructor Summary
AbstractWorldLocator()
           
 
Method Summary
 void configure(Configurator config)
          Configures this object from a given configurator.
abstract  java.lang.String[] getWorldNames()
          Returns a (possibly empty) list of locatable worlds
abstract  MolwindWorld locateWorld(java.lang.String worldName)
          Locates a world with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractWorldLocator

public AbstractWorldLocator()
Method Detail

configure

public void configure(Configurator config)
               throws ConfigException
Configures this object from a given configurator.

Specified by:
configure in interface Configurable
Parameters:
config - the configurator
Throws:
ConfigException - is thrown upon config error

getWorldNames

public abstract java.lang.String[] getWorldNames()
Returns a (possibly empty) list of locatable worlds

Specified by:
getWorldNames in interface WorldLocator
Returns:
an array of world names

locateWorld

public abstract MolwindWorld locateWorld(java.lang.String worldName)
                                  throws java.io.IOException
Locates a world with the given name.

Specified by:
locateWorld in interface WorldLocator
Parameters:
worldName - the name of the world
Returns:
a molwind world descriptor
Throws:
java.io.IOException - is thrown upon i/o error


Copyright © 2008-2010. All Rights Reserved.