com.tivoli.twg.engine
Class TWGRemoteSnapInManager

java.lang.Object
  extended byjava.lang.ClassLoader
      extended bycom.tivoli.twg.engine.TWGRemoteSnapInManager

public class TWGRemoteSnapInManager
extends java.lang.ClassLoader

This class is used to query snap-in's for Director from the console. There are also static methods in this class designed for loading information that a typical snap-in would require (such as an image or other resource). Only the static methods of this class should be called directly. The constructor has been made private to prevent using the non-static methods.


Method Summary
static boolean appendClassPath(java.lang.String path)
          This method is used to append a path to the CLASSPATH used on the server when loading snap-in information.
static java.awt.Image getImage(java.lang.String ImagePath)
          This method is used to load an image.
static TWGSnapIn getSnapInForSubType(java.lang.String siType, java.lang.String siSubType)
          This static method is used to get a snap-in's that has been registered for a specific type and sub-type.
static Vect getSnapInListForType(java.lang.String siType)
          This static method is used to get a list of snap-in's that have been registered for a specific type.
static void initialize()
          This method is used to initialize the remote snap-in manager.
 java.lang.Class loadClass(java.lang.String name)
          This method is used internally to load and resolve a class.
 java.lang.Class loadClass(java.lang.String className, boolean resolve)
          This method is used internally to load a class.
static byte[] loadResource(java.lang.String res)
          This method is used to load a resource (such as an HTML file) from the server.
static java.lang.Object loadSnapIn(TWGSnapIn si)
          This method is used to return an instance of a snap-in.
static java.lang.Object loadSnapInForSubType(java.lang.String siType, java.lang.String siSubType)
          This method is used to return an instance of a snap-in that has been registered for a specific type and sub-type.
static void terminate()
          This method is used to terminate the remote snap-in manager.
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialize

public static void initialize()
This method is used to initialize the remote snap-in manager. Console tasks do not need to call this function directly because it will be automatically called by the static functions.


terminate

public static void terminate()
This method is used to terminate the remote snap-in manager. Calling this method will cause all cached information on the console to be cleared and future calls to the other static methods will cause data to be queried from the server again.


getSnapInListForType

public static Vect getSnapInListForType(java.lang.String siType)
This static method is used to get a list of snap-in's that have been registered for a specific type. The returned Vect object is a collection of TWGSnapIn objects. Snap-in information retrieved from the server will be cached so that future calls for the same type will not result in calls to the server.


getSnapInForSubType

public static TWGSnapIn getSnapInForSubType(java.lang.String siType,
                                            java.lang.String siSubType)
This static method is used to get a snap-in's that has been registered for a specific type and sub-type. If a snap-in has been registred for the given type and sub-type, the TWGSnapIn object will be returned. If a snap-in has not been registered for the give type and sub-type, then this function returns null. The snap-in information retrieved from the server will be cached so that future calls for the same type and sub-type will not result in calls to the server.


loadSnapInForSubType

public static java.lang.Object loadSnapInForSubType(java.lang.String siType,
                                                    java.lang.String siSubType)
This method is used to return an instance of a snap-in that has been registered for a specific type and sub-type. If a snap-in has been registred for the given type and sub-type, the snap-in class is loaded, newInstance is called and the resulting object is returned. If a snap-in has not been registered for the give type and sub-type, then this function returns null; The snap-in class data retrieved from the server will be cached so that future calls for the same type and sub-type will not result in calls to the server.


loadSnapIn

public static java.lang.Object loadSnapIn(TWGSnapIn si)
This method is used to return an instance of a snap-in. The snap-in class is loaded, newInstance is called and the resulting object is returned. If an instance of the snap-in cannot be created, then this function returns null. The snap-in class data retrieved from the server will be cached so that future calls for the same type and sub-type will not result in calls to the server.


loadClass

public java.lang.Class loadClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
This method is used internally to load and resolve a class.

Throws:
java.lang.ClassNotFoundException

loadClass

public java.lang.Class loadClass(java.lang.String className,
                                 boolean resolve)
                          throws java.lang.ClassNotFoundException
This method is used internally to load a class.

Throws:
java.lang.ClassNotFoundException

getImage

public static java.awt.Image getImage(java.lang.String ImagePath)
This method is used to load an image. The function first trys to load the image from the console. If it cannot find the image on the console, it will try to load the image from the server. If the image cannot be found, then this function returns null. The image path provided to this function should not start with a slash (/) character. If an image is found on the server, it is cached so that future calls to this function for the same image do not result in calls to the server.


loadResource

public static byte[] loadResource(java.lang.String res)
This method is used to load a resource (such as an HTML file) from the server. If the resource cannot be found, then this function returns null. The name provided to this function should not start with a slash (/) character. If a resource is found on the server, it is cached so that future calls to this function for the same resource do not result in calls to the server.


appendClassPath

public static boolean appendClassPath(java.lang.String path)
This method is used to append a path to the CLASSPATH used on the server when loading snap-in information. If the new path is already in the CLASSPATH, then this function returns null.