com.sun.grid.jgdi.util

## Class JGDIShell

- java.lang.Object
- - com.sun.grid.jgdi.util.JGDIShell

- All Implemented Interfaces:
    Shell, java.lang.Runnable

      public class JGDIShell
      extends java.lang.Object
      implements java.lang.Runnable, Shell

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JGDIShell()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<java.lang.Class>` | `getAllAnnotatedClasses(java.lang.Package pkg, java.lang.Class annotated)` Attempts to list annotated classes in the given package and its ancestors as determined by the context class loader
    `JGDI` | `getConnection()` Getter method
    `java.io.PrintWriter` | `getErr()` Getter method
    `java.util.logging.Logger` | `getLogger()` Getter method
    `java.io.PrintWriter` | `getOut()` Getter method
    `static java.lang.String` | `getResourceString(java.lang.String key)`
    `static void` | `main(java.lang.String[] args)`
    `void` | `run()`
    `int` | `runShellCommand(java.lang.String line)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JGDIShell

          public JGDIShell()

  - ### Method Detail

    - #### getConnection

          public JGDI getConnection()

      Getter method
      Specified by:
        `getConnection` in interface `Shell`
      Returns:
        a JGDI object

    - #### getLogger

          public java.util.logging.Logger getLogger()

      Getter method
      Specified by:
        `getLogger` in interface `Shell`
      Returns:
        a logger

    - #### getOut

          public java.io.PrintWriter getOut()

      Getter method
      Specified by:
        `getOut` in interface `Shell`
      Returns:
        a standard output print writer

    - #### getErr

          public java.io.PrintWriter getErr()

      Getter method
      Specified by:
        `getErr` in interface `Shell`
      Returns:
        a standard error print writer

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### runShellCommand

          public int runShellCommand(java.lang.String line)
                              throws java.lang.InterruptedException,
                                     java.io.IOException,
                                     java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`
        `java.io.IOException`

    - #### main

          public static void main(java.lang.String[] args)

    - #### getResourceString

          public static java.lang.String getResourceString(java.lang.String key)

    - #### getAllAnnotatedClasses

          public static java.util.List<java.lang.Class> getAllAnnotatedClasses(java.lang.Package pkg,
                                                                               java.lang.Class annotated)
                                                                        throws java.lang.ClassNotFoundException

      Attempts to list annotated classes in the given package and its ancestors as determined by the context class loader
      Parameters:
        `pkg` - a Package as a starting point
        `annotated` - Class the annotation class to search
      Returns:
        a list of all annotated classes that exist within that package
      Throws:
        `java.lang.ClassNotFoundException` - if something went wrong

Copyright © 2007 Sun Microsystems, Inc. All rights reserved.