Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.emp.mtp.jcics
Class ProgramInitiator

    java.lang.Object
      |
      +--com.sun.emp.mtp.jcics.ProgramInitiator

public class ProgramInitiator
extends java.lang.Object

This class exists to be the interface from the unikix tran processor into initiating a Java Program.

It is a singleton model, and the single instance is obtained using the getInstance() method.

Method Summary
`void` | `dumpException(java.lang.Throwable t)` This method prints a throwable to System.err.
`java.lang.Class` | `getClass(java.lang.String className, java.lang.String environment)` This method obtains the Class object comes from the supplied environment.
`static ProgramInitiator` | `getInstance()` Get hold of the singleton instance of this class
`java.lang.reflect.Method` | `getMainMethod(java.lang.String className, java.lang.String environment)` This method obtains the Method object that corresponds to the entry point of a User application.
`void` | `invokeMainMethod(java.lang.reflect.Method method, CommAreaHolder commArea)` This method calls the main Method of a users class.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static ProgramInitiator getInstance()

  Get hold of the singleton instance of this class

### getClass

    public java.lang.Class getClass(java.lang.String className,
                                    java.lang.String environment)
                             throws java.lang.ClassNotFoundException

  This method obtains the Class object comes from the supplied environment.

  It is passed a string which is the 'environment' in which to run. This is important since this code will create a separate class loader for each different 'environment' that ever gets passed in.

  Parameters:
    `className` - The name of the class to load.
    `environment` - A string containing the URLs that contain the classes available to the required class. This should be a 'native' format class type string.
  Returns:
    The Method which can be invoked later.
  Throws:
    java.lang.ClassNotFoundException -

### getMainMethod

    public java.lang.reflect.Method getMainMethod(java.lang.String className,
                                                  java.lang.String environment)
                                           throws java.lang.ClassNotFoundException,
                                                  java.lang.NoSuchMethodException

  This method obtains the Method object that corresponds to the entry point of a User application.

  It is passed a string which is the 'environment' in which to run. This is important since this code will create a separate class loader for each different 'environment' that ever gets passed in.

  Parameters:
    `className` - The name of the class to load.
    `environment` - A string containing the URLs that contain the classes available to the required class. This should be a 'native' format class type string.
  Returns:
    The Method which can be invoked later.
  Throws:
    java.lang.ClassNotFoundException -
    java.lang.NoSuchMethodException -

### invokeMainMethod

    public void invokeMainMethod(java.lang.reflect.Method method,
                                 CommAreaHolder commArea)
                          throws java.lang.Throwable

  This method calls the main Method of a users class. This is passed in, along with the CommArea object.
  Parameters:
    `method` - The main method as returned by getMainMethod().
    `commArea` - The commarea to be passed to the method.
  Throws:
    java.lang.ClassNotFoundException -
    java.lang.NoSuchMethodException -

### dumpException

    public void dumpException(java.lang.Throwable t)

  This method prints a throwable to System.err. It is used by native code to put some output when a problem occurs.

  It should actually put it to unikixmain.err. This needs looking into.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2002 by Sun Microsystems, Inc.