GigaSpaces XAP 9.7.2 API

com.sun.jini.tool.envcheck
Class AbstractPlugin

java.lang.Object
  extended by com.sun.jini.tool.envcheck.AbstractPlugin
All Implemented Interfaces:
Plugin
Direct Known Subclasses:
CheckActivationSystem, CheckCodebase, CheckConfig, CheckJDK1_4, CheckJSKPlatform, CheckJSKPolicy, CheckJsseProps, CheckLoggingConfig, CheckNoLoopback, CheckPersistence, CheckPolicy

public abstract class AbstractPlugin
extends Object
implements Plugin

Base class for plugins providing rudimentary I18N support


Constructor Summary
protected AbstractPlugin()
          Initialize the base class by obtaining the resource bundle associated with the instantiated class.
 
Method Summary
protected  ResourceBundle getBundle()
          Get the resource bundle for this class.
protected  String getString(String key)
          Get the format string associated with key from the resource bundle for this class.
protected  String getString(String key, Object val)
          Get the format string associated with key from the resource bundle for this class.
protected  String getString(String key, Object val1, Object val2)
          Get the format string associated with key from the resource bundle for this class.
protected  String getString(String key, Object v1, Object v2, Object v3)
          Get the format string associated with key from the resource bundle for this class.
protected  void handleUnexpectedSubtaskReturn(Object returnedValue, String source)
          Utility method which can be called to process objects of unexpected type which are returned by a subtask.
 boolean isPluginOption(String opt)
          Determine whether arg is a plugin-specific command-line option for this plugin and save any necessary state.
protected  String taskName(String name)
          Return a fully qualified external class name for the given static inner class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.jini.tool.envcheck.Plugin
run
 

Constructor Detail

AbstractPlugin

protected AbstractPlugin()
Initialize the base class by obtaining the resource bundle associated with the instantiated class.

Method Detail

isPluginOption

public boolean isPluginOption(String opt)
Description copied from interface: Plugin
Determine whether arg is a plugin-specific command-line option for this plugin and save any necessary state. State should be saved in static fields since plugin instances may not be cached.

Specified by:
isPluginOption in interface Plugin
Parameters:
opt - the command-line option to examine
Returns:
true if the plugin supports this option

getBundle

protected ResourceBundle getBundle()
Get the resource bundle for this class.

Returns:
the resource bundle

getString

protected String getString(String key)
Get the format string associated with key from the resource bundle for this class.

Parameters:
key - the key identifying the format string
Returns:
the format string

getString

protected String getString(String key,
                           Object val)
Get the format string associated with key from the resource bundle for this class.

Parameters:
key - the key identifying the format string
val - the value to associate with {0}
Returns:
the format string

getString

protected String getString(String key,
                           Object val1,
                           Object val2)
Get the format string associated with key from the resource bundle for this class.

Parameters:
key - the key identifying the format string
val1 - the value to associate with {0}
val2 - the value to associate with {1}
Returns:
the format string

getString

protected String getString(String key,
                           Object v1,
                           Object v2,
                           Object v3)
Get the format string associated with key from the resource bundle for this class.

Parameters:
key - the key identifying the format string
v1 - the value to associate with {0}
v2 - the value to associate with {1}
v3 - the value to associate with {2}
Returns:
the format string

taskName

protected String taskName(String name)
Return a fully qualified external class name for the given static inner class name.

Parameters:
name - the unqualified name of the inner class
Returns:
the fully qualified name

handleUnexpectedSubtaskReturn

protected void handleUnexpectedSubtaskReturn(Object returnedValue,
                                             String source)
Utility method which can be called to process objects of unexpected type which are returned by a subtask. If returnedValue is not a Throwable, then Thread.dumpStack() is called to help located the source of the problem. Otherwise a stacktrace is printed; the -traces option does not affect this trace.

Parameters:
returnedValue - the object returned by the subtask
source - descriptive text identifying the source at the time the subtask was launched

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.