org.sf.bluprints
Class Engine

java.lang.Object
  extended by org.sf.bluprints.Engine

public class Engine
extends Object

This class is the main engine. Given a URI to a Bluprints XML file in the classpath, this will parse the file as well as determine when to reload the file based on the configuration in the XML file.

The default URI to the classpath entry for the Bluprints XML file is always:

bluprints.xml

Author:
Brian Pontarelli

Constructor Summary
Engine(long reloadSeconds, String... uris)
          Constructs a new engine.
 
Method Summary
 Bluprint getPage(String name)
          Returns the Bluprint for the given name, or null.
 long getReloadSeconds()
          Determines how often the configuration file is reloaded.
 void setReloadSeconds(long reloadSeconds)
          Determines how often the configuration file is reloaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Engine

public Engine(long reloadSeconds,
              String... uris)
Constructs a new engine. The default URI is always '/bluprints.xml'.

Method Detail

getReloadSeconds

public long getReloadSeconds()
Determines how often the configuration file is reloaded. If this is set to -1, it is never reloaded. This value changes after the configuration is loaded if the configuration file contains a value for the reloadSeconds attribute on the root element.

Defaults to 1 second


setReloadSeconds

public void setReloadSeconds(long reloadSeconds)
Determines how often the configuration file is reloaded. If this is set to -1, it is never reloaded. This value changes after the configuration is loaded if the configuration file contains a value for the reloadSeconds attribute on the root element.

Defaults to 1 second


getPage

public Bluprint getPage(String name)
Returns the Bluprint for the given name, or null. This loads and possibly reloads the Bluprint configuration file from the classpath.



"Copyright © 2002, Bluprints, Creative Commons License"