gov.nasa.arc.brahms.vm.api
Interface IBVM


public interface IBVM

IBVM is the interface to the Brahms Virtual Machine.

Version:
$Revision: 1.1 $ $Date: 2008/02/08 14:11:42 $ $Author: rvhoof $
Author:
Ron van Hoof

Method Summary
 void addProcessListener(IProcessListener listener)
          Adds the specified process listener to this virtual machine to be notified when the virtual machine exits.
 int getErrorCode()
          Returns the error code set by the VM when initializing the VM.
 java.lang.Throwable getErrorException()
          Returns the error exception if one is available, null otherwise.
 java.lang.String getErrorMessage()
          Returns the error message if the error code is larger than 0.
 IVMController getVMController()
          Returns the virtual machine's controller
 int initialize(java.lang.String[] argv)
          Parses the arguments defining the vm parameters and vm behavior and starts and initializes the virtual machine controller.
 int initialize(java.lang.String[] argv, java.util.Properties p)
          Parses the arguments defining the vm parameters and vm behavior, uses the specifies Properties as the base configuration and starts and initializes the virtual machine controller.
 void removeProcessListener(IProcessListener listener)
          Removes the specified listener as a process listener for the virtual machine.
 void setExternalControl(boolean external)
          Indicates whether the VM is controlled by an external application.
 

Method Detail

setExternalControl

void setExternalControl(boolean external)
Indicates whether the VM is controlled by an external application.


getErrorCode

int getErrorCode()
Returns the error code set by the VM when initializing the VM.

Returns:
int 0 if no errors, 1 if critical error, 2 if non-critical error

getErrorMessage

java.lang.String getErrorMessage()
Returns the error message if the error code is larger than 0.

Returns:
String the error message, null if no message

getErrorException

java.lang.Throwable getErrorException()
Returns the error exception if one is available, null otherwise.

Returns:
Throwable the error exception if one was generated, null otherwise.

initialize

int initialize(java.lang.String[] argv)
Parses the arguments defining the vm parameters and vm behavior and starts and initializes the virtual machine controller.

Parameters:
argv - the list of arguments passed to the Brahms virtual machine
Returns:
int an error code, 0 if no errors.

initialize

int initialize(java.lang.String[] argv,
               java.util.Properties p)
Parses the arguments defining the vm parameters and vm behavior, uses the specifies Properties as the base configuration and starts and initializes the virtual machine controller.

Parameters:
argv - the list of arguments passed to the Brahms virtual machine
p - the properties used to configure the Brahms virtual machine
Returns:
int an error code, 0 if no errors.

addProcessListener

void addProcessListener(IProcessListener listener)
Adds the specified process listener to this virtual machine to be notified when the virtual machine exits.

Parameters:
listener - the IProcessListener to be registered

removeProcessListener

void removeProcessListener(IProcessListener listener)
Removes the specified listener as a process listener for the virtual machine.

Parameters:
listener - the IProcessListener to be removed.

getVMController

IVMController getVMController()
                              throws ExternalException
Returns the virtual machine's controller

Returns:
VMController the vm's controller
Throws:
ExternalException - if there was a problem returning the controller
See Also:
IVMController


Copyright © 1997-2012 All Rights Reserved.