SOAj Core v. 1.3


info.soaj.core.plugin
Class SjAbstractPluginEmail

java.lang.Object
  extended by info.soaj.core.plugin.SjBasePlugin
      extended by info.soaj.core.plugin.SjAbstractPluginEmail
All Implemented Interfaces:
java.io.Serializable

public abstract class SjAbstractPluginEmail
extends SjBasePlugin

This SOAj plugin supports emailing.

See SjBasePlugin for plugin pattern details.

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 static long serialVersionUID
          UID
 
Constructor Summary
SjAbstractPluginEmail(SjPopulatedPluginKey pluginKey)
          Constructor - protected
 
Method Summary
 int getMaximumExceptionMessagesPerDay()
          This convenience method to returns the maximum exception messages sent in a 24-hour period.
 int getMaximumExceptionMessagesPerHour()
          This convenience method returns the maximum exception messages sent in a 60-minute period.
abstract  boolean sendEmail(SjAttributesForAbstractPluginEmail emailAttributes)
          This method sends an email message.
abstract  boolean sendEmailThrowable(SjAttributesForAbstractPluginEmail emailAttributes)
          This method sends an email exception message.
 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 info.soaj.core.plugin.SjBasePlugin
createPluginMetadataCB, getPluginMetadata, getPluginProperties, getPopulatedPluginKey, initCB
 
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
Constructor Detail

SjAbstractPluginEmail

public SjAbstractPluginEmail(SjPopulatedPluginKey pluginKey)
Constructor - protected

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

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

verifyCB

public boolean verifyCB()
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.

Overrides:
verifyCB in class SjBasePlugin
Returns:
boolean - 'True' indicates the plugin is "good to go"!

sendEmail

public abstract boolean sendEmail(SjAttributesForAbstractPluginEmail emailAttributes)
This method sends an email message.

Parameters:
emailAttributes -
Returns:
boolean - 'True' indicates the message was successfully sent.

sendEmailThrowable

public abstract boolean sendEmailThrowable(SjAttributesForAbstractPluginEmail emailAttributes)
This method sends an email exception message.

Parameters:
emailAttributes -
Returns:
boolean - 'True' indicates the exception message was successfully sent.

getMaximumExceptionMessagesPerHour

public int getMaximumExceptionMessagesPerHour()
This convenience method returns the maximum exception messages sent in a 60-minute period.

Returns:
int

getMaximumExceptionMessagesPerDay

public int getMaximumExceptionMessagesPerDay()
This convenience method to returns the maximum exception messages sent in a 24-hour period.

Returns:
int

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.