SOAj Core v. 1.3


info.soaj.core.plugin
Class SjBasePlugin

java.lang.Object
  extended by info.soaj.core.plugin.SjBasePlugin
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SjAbstractPluginEmail, SjAbstractPluginLogging, SjPluginStartup

public abstract class SjBasePlugin
extends java.lang.Object
implements java.io.Serializable

This base class supports attributes and methods for SOAj plugins. Two abstract callback methods (CB) may be overridden to provide initialization and verification of the plugin following instantiation.

Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com .

Since:
v. 1.0
Author:
MarvinToll@gtcGroup.com
See Also:
Serialized Form

Field Summary
private  SjPopulatedPluginKey populatedPluginKey
          The wrapper object containing the descriptor document properties associated with this plugin.
private static long serialVersionUID
          UID
 
Constructor Summary
SjBasePlugin(SjPopulatedPluginKey populatedPluginKey)
          Constructor - protected
 
Method Summary
abstract  SjBaseMetadata createPluginMetadataCB()
          This method
 SjBaseMetadata getPluginMetadata()
          This method returns the pluginMetadata attribute.
 SjPluginProperties getPluginProperties()
          This method returns the declared plugin properties.
 SjPopulatedPluginKey getPopulatedPluginKey()
          This method returns the populatedPluginKey attribute.
 void initCB()
          This callback method is invoked exactly once by a factory after instantiating the plugin.
 boolean verifyCB()
          This callback method is invoked exactly once upon application server startup AFTER the initCB() methods complete successfully for ALL plugins.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
UID

See Also:
Constant Field Values

populatedPluginKey

private final SjPopulatedPluginKey populatedPluginKey
The wrapper object containing the descriptor document properties associated with this plugin.

Constructor Detail

SjBasePlugin

public SjBasePlugin(SjPopulatedPluginKey populatedPluginKey)
Constructor - protected

The SOAj plugin pattern enforces instantiation of a plugin via the General Store. Concrete class constructors should be coded as 'protected'.

Parameters:
populatedPluginKey - The 'Key' defined in the descriptor document.
Method Detail

createPluginMetadataCB

public abstract SjBaseMetadata createPluginMetadataCB()
This method

Returns:
SjBaseMetadata - The wrapper object containing plugin information.

initCB

public void initCB()
            throws SjCoreExceptionActivationSequence
This callback method is invoked exactly once by a factory after instantiating the plugin. It must complete successfully before the plugin is considered activated. It should contain all initialization processing.

Throws:
SjCoreExceptionActivationSequence

verifyCB

public boolean verifyCB()
                 throws SjCoreExceptionActivationSequence
This callback method is invoked exactly once upon application server startup AFTER the initCB() methods complete successfully for ALL plugins. This method provides an opportunity for a onetime execution of verification logic to ensure the integrity (or fitness) of a plugin for use. As an example, a sophisticated implementation might fire all of the plugin methods (perhaps using mock objects) to ensure the plugin is 100% operational.

Returns:
boolean - 'True' indicates the plugin is "good to go"!
Throws:
SjCoreExceptionActivationSequence

getPluginProperties

public SjPluginProperties getPluginProperties()
This method returns the declared plugin properties.

Returns:
SjPluginProperties

getPluginMetadata

public SjBaseMetadata getPluginMetadata()
This method returns the pluginMetadata attribute.

Returns:
SjBaseMetadata - A class-scoped attribute.

getPopulatedPluginKey

public SjPopulatedPluginKey getPopulatedPluginKey()
This method returns the populatedPluginKey attribute.

Returns:
SjPopulatedPluginKey - A class-scoped attribute.

SOAj Core v. 1.3


Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.