|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGObject
com.tivoli.twg.engine.TWGExtension
Base class for defining engine extension packages. Each extension package must define a subclass of TWGExtension, providing implementations of various initialization exits. During initialization, each file in the extensions directory (see TWGEnvironment.getExtensionsDirectory) matching the '*.TWGExt" pattern is opened and used to initialize a Properties object. If successful, the Properties are checked for the 'twg.extension.classname' property (which is the name of TWGExtension subclass for the extension package). This name is then used to load the class, create an instance using the default constructor (the property set is accessable during the constructor of the subclass, if needed).
Field Summary | |
---|---|
static java.lang.String |
EXTENSION_CLASS
Property for extension's classname |
static java.lang.String |
EXTENSION_CLI_CLASS
Property for cli bundle definition |
static java.lang.String |
EXTENSION_DELAY_CLASS_INIT
Property to delay the ClassInit call to after everyone else |
static java.lang.String |
EXTENSION_DISABLED
Property for extension's disabled state |
static java.lang.String |
EXTENSION_NAME
Property for extension's name resource (name ID in NLS resource) |
static java.lang.String |
EXTENSION_NLS_CLASS
Property for extension's NLS resource (for strings) |
static java.lang.String |
EXTENSION_VENDOR
Property for extension's vendor (vendor ID in NLS resource) |
static java.lang.String |
EXTENSION_VERSION
Property for extension's version |
static int |
PREVIOUS_SERVER_VERSION_NEW_SERVER
Previous server version: new server configuration or fresh install |
Constructor Summary | |
---|---|
protected |
TWGExtension()
Default constructor for TWGExtension. |
Method Summary | |
---|---|
static void |
DoInitClassInstances()
Execute second initialization method for all loaded extensions |
static void |
DoInitClassRegistration()
Execute first initialization method for all loaded extensions |
static void |
DoInitCompletion()
Execute final initialization method for all loaded extensions |
static void |
DoStartupCompletion()
Execute startup completion method for all loaded extensions |
static void |
DoTermBegin()
Execute first termination method for all loaded extensions |
static void |
DoTermComplete()
Execute final termination method for all loaded extensions |
java.lang.String |
ExtensionName(java.util.Locale locale)
Get extension name for extension |
static java.lang.String |
getActiveExtensionName()
Return name of TWGExtension subclass currently active. |
java.lang.String |
GetConShadowClass()
Get name of console shadow class. |
static int |
getCurrentStartupVersion()
Get version of server for current startup. |
static int |
getLastStartupVersion()
Get version of server during last successful startup. |
java.lang.String |
getNLSstring(java.util.Locale locale,
java.lang.String property_name)
Get NLS extension string for given ID |
java.lang.String |
getProperty(java.lang.String pname)
Get extension property value. |
java.util.Properties |
getPropertySet()
Get extension's property set. |
static java.lang.Class |
GetRegisteredClass(java.lang.String cname)
Return registered class |
static java.lang.Class[] |
GetRegisteredClasses(java.lang.String superclass_name)
Get list of loaded and registered subclasses which are subclasses of a given class. |
byte[] |
GetShadowRecord(java.util.Locale locale)
Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class. |
long |
GetShadowVersion()
Get object state version. |
void |
InitClassInstances()
Second initialization method, intended to allow extension to create default instances of classes registered during InitClassRegistration(). |
void |
InitClassInstances(boolean is_enabled)
Second initialization method, intended to allow extension to create default instances of classes registered during InitClassRegistration(). |
void |
InitClassRegistration()
First initialization method, intended to allow extensions to register classes. |
void |
InitClassRegistration(boolean is_enabled)
First initialization method, intended to allow extensions to register classes. |
void |
InitCompletion()
Final initialization method, intended to allow an extension to do any actions which may have required the other extensions to have completed the previous passes of initialization. |
void |
InitCompletion(boolean is_enabled)
Final initialization method, intended to allow an extension to do any actions which may have required the other extensions to have completed the previous passes of initialization. |
boolean |
isClassInitDelayed()
Check if extension wants to be called after everyone else has been called |
boolean |
isDisabled()
Check if extension is disabled |
static boolean |
isExtensionClassDefined(java.lang.String cn)
Return true if given TWGExtension subclass has been defined |
static boolean |
isNewInstallOrConfig()
Check to see if this is a new install (or a fresh configuration |
static boolean |
isRegistered(java.lang.String cname)
Test to see if class was successfully registered |
static boolean |
IsRegisteredClass(java.lang.String cname)
Test to see if class was successfully registered |
static boolean |
isUpdatedServerBuildOrVersion()
Check to see if updated version or build |
static boolean |
isUpdatedServerVersion()
Check to see if updated server version (not just new build of same version) |
static void |
LoadCommandBundles()
Load CLI Bundles |
void |
RegisterClass(java.lang.String cname)
Register a TWGObject-family subclass. |
void |
SetObjectID(long oid)
Change the object ID to a new value |
void |
setProperty(java.lang.String pname,
java.lang.String pvalue)
Set extension property value. |
void |
StartupCompletion()
Startup complete method, intended to allow an extension to do any actions which required the completion of server startup (including automatic startup of other tasks, etc). |
void |
StartupCompletion(boolean is_enabled)
Startup complete method, intended to allow an extension to do any actions which required the completion of server startup (including automatic startup of other tasks, etc). |
void |
TermBegin()
First termination method, intended to allow an extension to begin the process of termination. |
void |
TermBegin(boolean is_enabled)
First termination method, intended to allow an extension to begin the process of termination. |
void |
TermComplete()
Final termination method, intended to allow an extension to terminate any processing which may still be active. |
void |
TermComplete(boolean is_enabled)
Final termination method, intended to allow an extension to terminate any processing which may still be active. |
void |
UpdateShadowVersion()
Update object state version. |
java.lang.String |
VendorName(java.util.Locale locale)
Get vendor name for extension |
java.lang.String |
VersionName(java.util.Locale locale)
Get extension version |
Methods inherited from class com.tivoli.twg.engine.TWGObject |
---|
AllObjects, AllObjects, Delete, Destroy, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String EXTENSION_CLASS
public static final java.lang.String EXTENSION_VERSION
public static final java.lang.String EXTENSION_NLS_CLASS
public static final java.lang.String EXTENSION_NAME
public static final java.lang.String EXTENSION_VENDOR
public static final java.lang.String EXTENSION_DISABLED
public static final java.lang.String EXTENSION_DELAY_CLASS_INIT
public static final java.lang.String EXTENSION_CLI_CLASS
public static final int PREVIOUS_SERVER_VERSION_NEW_SERVER
Constructor Detail |
protected TWGExtension()
Method Detail |
public void SetObjectID(long oid) throws DuplicateObjectIDException
SetObjectID
in class TWGObject
oid
- - new object ID value
DuplicateObjectIDException
- if new ID is duplicatepublic java.lang.String getProperty(java.lang.String pname)
pname
- - property name
public void setProperty(java.lang.String pname, java.lang.String pvalue)
pname
- - property namepvalue
- - property valuepublic java.util.Properties getPropertySet()
public void RegisterClass(java.lang.String cname) throws java.lang.ClassNotFoundException
cname
- - Name of class to be registered
java.lang.ClassNotFoundException
- if class not successfully loadedpublic static java.lang.Class[] GetRegisteredClasses(java.lang.String superclass_name)
public static boolean IsRegisteredClass(java.lang.String cname)
cname
- - name of class to be checked
public static boolean isRegistered(java.lang.String cname)
cname
- - name of class to be checked
public static java.lang.Class GetRegisteredClass(java.lang.String cname)
cname
- - name of registered class
public static void LoadCommandBundles() throws TWGExtensionInitException
TWGExtensionInitException
- if any bundles failed to loadpublic static void DoInitClassRegistration() throws TWGExtensionInitException
TWGExtensionInitException
- if any extensions abortpublic static void DoInitClassInstances() throws TWGExtensionInitException
TWGExtensionInitException
- if any extensions abortpublic static void DoInitCompletion() throws TWGExtensionInitException
TWGExtensionInitException
- if any extensions abortpublic static void DoStartupCompletion()
public static void DoTermBegin() throws TWGExtensionTermException
TWGExtensionTermException
- if any extensions abortpublic static void DoTermComplete() throws TWGExtensionTermException
TWGExtensionTermException
- if any extensions abortpublic void InitClassRegistration() throws TWGExtensionInitException
TWGExtensionInitException
- if a fatal error occurs during
the initialization methodpublic void InitClassRegistration(boolean is_enabled) throws TWGExtensionInitException
is_enabled
- - true if extension is enabled, false if not enabled
TWGExtensionInitException
- if a fatal error occurs during
the initialization methodpublic void InitClassInstances() throws TWGExtensionInitException
TWGExtensionInitException
- if a fatal error occurs during
the initialization methodpublic void InitClassInstances(boolean is_enabled) throws TWGExtensionInitException
is_enabled
- - true if extension is enabled, false if not enabled
TWGExtensionInitException
- if a fatal error occurs during
the initialization methodpublic void InitCompletion() throws TWGExtensionInitException
TWGExtensionInitException
- if a fatal error occurs during
the initialization methodpublic void InitCompletion(boolean is_enabled) throws TWGExtensionInitException
is_enabled
- - true if enabled, false if disabled
TWGExtensionInitException
- if a fatal error occurs during
the initialization methodpublic void StartupCompletion()
public void StartupCompletion(boolean is_enabled)
is_enabled
- - true if extension is enabled, false if notpublic void TermBegin() throws TWGExtensionTermException
TWGExtensionTermException
- if an error occurs during the
termination methodpublic void TermBegin(boolean is_enabled) throws TWGExtensionTermException
is_enabled
- - true if enabled, false if disabled
TWGExtensionTermException
- if an error occurs during the
termination methodpublic void TermComplete() throws TWGExtensionTermException
TWGExtensionTermException
- if an error occurs during the
termination methodpublic void TermComplete(boolean is_enabled) throws TWGExtensionTermException
is_enabled
- - true if enabled, false if not
TWGExtensionTermException
- if an error occurs during the
termination methodpublic java.lang.String VendorName(java.util.Locale locale)
locale
- - locale requested for vendor name
public java.lang.String ExtensionName(java.util.Locale locale)
locale
- - locale requested for vendor name
public java.lang.String VersionName(java.util.Locale locale)
locale
- - locale requested for vendor name
public java.lang.String getNLSstring(java.util.Locale locale, java.lang.String property_name)
locale
- - locale to be requestedproperty_name
- - name of property containing string ID
public void UpdateShadowVersion()
UpdateShadowVersion
in interface TWGBaseShadowedObject
public long GetShadowVersion()
GetShadowVersion
in interface TWGBaseShadowedObject
public java.lang.String GetConShadowClass()
GetConShadowClass
in interface TWGBaseShadowedObject
public byte[] GetShadowRecord(java.util.Locale locale)
GetShadowRecord
in interface TWGBaseShadowedObject
locale
- - Locale of requested data
public static boolean isExtensionClassDefined(java.lang.String cn)
cn
- - classname of TWGExtension subclass
public static java.lang.String getActiveExtensionName()
public final boolean isDisabled()
public final boolean isClassInitDelayed()
public static boolean isNewInstallOrConfig()
public static boolean isUpdatedServerBuildOrVersion()
public static boolean isUpdatedServerVersion()
public static int getLastStartupVersion()
public static int getCurrentStartupVersion()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |