com.virtualweaver.xotics.dialect.xape.player
Class XapPlayer

java.lang.Object
  extended bycom.virtualweaver.xotics.dialect.xape.player.XapPlayer

public final class XapPlayer
extends java.lang.Object

XAPE Player is a enhanced version of XapEngine. It adds to XapEngine an application deployment management defined in an XML document and a main() method to execute the Engine as a stand-alone application.

Version:
2.1

Constructor Summary
XapPlayer(com.virtualweaver.xotics.datamodel.XoEnvironment env, java.net.URL initFile)
          Unique constructor.
 
Method Summary
 XapRepository getRepository()
          Returns the repository.
static void main(java.lang.String[] args)
          Command line arguments : -h : help message one arg : config or application deployment file URL (default is conf sub-dir from this class loc) no arg : launch UI control (not yet implemented)
 XapResponse sendRequest(XapRequest req)
          Send a request to a XAPE Application/Instance.
 void shutdown()
          stops the engine
 void startup()
          starts the engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XapPlayer

public XapPlayer(com.virtualweaver.xotics.datamodel.XoEnvironment env,
                 java.net.URL initFile)
          throws com.virtualweaver.xotics.datamodel.XoException,
                 XapException
Unique constructor. Configuration described in XML config file from param initFile is set up in this constructor.

Parameters:
env - XO environment to use
initFile - the deployment document describing what to launch and how.
Throws:
com.virtualweaver.xotics.datamodel.XoException
XapException
Method Detail

startup

public void startup()
             throws XapException
starts the engine

Throws:
XapException
See Also:
XapEngine.startup()

shutdown

public void shutdown()
              throws XapException
stops the engine

Throws:
XapException
See Also:
XapEngine.shutdown()

getRepository

public XapRepository getRepository()
Returns the repository.

Returns:
an object informing about which application/instances are loaded or running.
See Also:
XapEngine.getRepository()

sendRequest

public XapResponse sendRequest(XapRequest req)
                        throws XapException
Send a request to a XAPE Application/Instance.

Parameters:
req - a XAPE request
Returns:
a possible XAPE response, or null if no response
Throws:
XapException
See Also:
XapEngine.sendRequest(com.virtualweaver.xotics.dialect.xape.engine.XapRequest)

main

public static void main(java.lang.String[] args)
Command line arguments : -h : help message one arg : config or application deployment file URL (default is conf sub-dir from this class loc) no arg : launch UI control (not yet implemented)

Parameters:
args -