|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.action.ActionExecutor org.apache.oozie.action.email.EmailActionExecutor
public class EmailActionExecutor
Email action executor. It takes to, cc addresses along with a subject and body and sends out an email.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.oozie.action.ActionExecutor |
---|
ActionExecutor.Context |
Field Summary |
---|
Fields inherited from class org.apache.oozie.action.ActionExecutor |
---|
CONF_PREFIX, ERROR_OTHER, MAX_RETRIES, requiresNNJT, RETRY_INTERVAL |
Constructor Summary | |
---|---|
EmailActionExecutor()
|
Method Summary | |
---|---|
void |
check(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Check if an action has completed. |
protected void |
email(ActionExecutor.Context context,
String[] to,
String[] cc,
String subject,
String body)
|
void |
end(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
End an action after it has executed. |
void |
initActionType()
Invoked once at system initialization time. |
boolean |
isCompleted(String externalStatus)
Return if the external status indicates that the action has completed. |
void |
kill(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Kill an action. |
void |
start(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Start an action. |
protected void |
validateAndMail(ActionExecutor.Context context,
org.jdom.Element element)
|
Methods inherited from class org.apache.oozie.action.ActionExecutor |
---|
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getType, registerError, resetInitInfo, setMaxRetries, setRetryInterval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmailActionExecutor()
Method Detail |
---|
public void initActionType()
ActionExecutor
ActionExecutor.registerError(java.lang.String, org.apache.oozie.action.ActionExecutorException.ErrorType, java.lang.String)
method to register
all its possible errors. Subclasses overriding must invoke super.
initActionType
in class ActionExecutor
public void start(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setStartData(java.lang.String, java.lang.String, java.lang.String)
method must be called within this method. If the
action has completed, the ActionExecutor.Context.setExecutionData(java.lang.String, java.util.Properties)
method must be called within this method.
start
in class ActionExecutor
context
- executor context.action
- the action to start.
ActionExecutorException
- thrown if the action could not start.protected void validateAndMail(ActionExecutor.Context context, org.jdom.Element element) throws ActionExecutorException
ActionExecutorException
protected void email(ActionExecutor.Context context, String[] to, String[] cc, String subject, String body) throws ActionExecutorException
ActionExecutorException
public void end(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String)
method must be called within this
method.
end
in class ActionExecutor
context
- executor context.action
- the action to end.
ActionExecutorException
- thrown if the action could not end.public void check(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setExecutionData(java.lang.String, java.util.Properties)
method must be called within this method. If the action
has not completed, the ActionExecutor.Context.setExternalStatus(java.lang.String)
method must be called within this method.
check
in class ActionExecutor
context
- executor context.action
- the action to end.
ActionExecutorException
- thrown if the action could not be checked.public void kill(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String)
method must be called within this method.
kill
in class ActionExecutor
context
- executor context.action
- the action to kill.
ActionExecutorException
- thrown if the action could not be killed.public boolean isCompleted(String externalStatus)
ActionExecutor
isCompleted
in class ActionExecutor
externalStatus
- external status to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |