com.virtualweaver.xotics.datamodel
Class XoEnvironment

java.lang.Object
  extended bycom.virtualweaver.xotics.datamodel.XoEnvironment

public final class XoEnvironment
extends java.lang.Object

This class is the entry point to access all Xotics features. Instanciating an XoEnvironment object creates a Xotics environment. In this environment, one XoRegistry, one XoFactory, one XoClassLoader and one XoLogMessageBuffer instances are provided to work with Data-Models. One can create as many XoEnvironment objects as wanted, but each environment is isolated from each other.

Version:
4.1

Constructor Summary
XoEnvironment()
          Standard constructor, creates a valid environment composed with respectively one instance of a Factory, Registry, class loader and Log Buffer.
XoEnvironment(boolean applet)
          Special constructor, to use when this is embedded in an Applet.
 
Method Summary
 XoClassLoader getClassLoader()
          Returns the class loader used in this environment
 XoFactory getFactory()
          Returns the environment Factory, responsible for creation of Data-Model instances
 XoLogMessageBuffer getLogMessageBuffer()
          Returns the environment Log message buffer, which stores log messages created by both core objects and user applications.
 XoRegistry getRegistry()
          Returns the environment Registry, responsible for storing Data-Model definitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XoEnvironment

public XoEnvironment()
              throws XoException
Standard constructor, creates a valid environment composed with respectively one instance of a Factory, Registry, class loader and Log Buffer.

Throws:
XoException - when init fails

XoEnvironment

public XoEnvironment(boolean applet)
              throws XoException
Special constructor, to use when this is embedded in an Applet. It creates a standard environment but creates a special class loader if param applet is true. Then, the class loader is made compatible with applet security restrictions : it is no more possible for the class loader to load resources from network, only the AppletClassloader can do. if param applet is true, the class loader is made compatible with applet security restrictions

Throws:
XoException - when init fails
See Also:
XoClassLoader
Method Detail

getRegistry

public XoRegistry getRegistry()
Returns the environment Registry, responsible for storing Data-Model definitions

Returns:
the environment's Registry

getFactory

public XoFactory getFactory()
Returns the environment Factory, responsible for creation of Data-Model instances

Returns:
the environment's Registry

getLogMessageBuffer

public XoLogMessageBuffer getLogMessageBuffer()
Returns the environment Log message buffer, which stores log messages created by both core objects and user applications.

Returns:
the environment's Registry

getClassLoader

public XoClassLoader getClassLoader()
Returns the class loader used in this environment

Returns:
the environment's class loader