public abstract class AbstractCustomAction extends Object implements CustomAction
CustomAction
methods for easy extensions.Modifier | Constructor and Description |
---|---|
protected |
AbstractCustomAction() |
protected |
AbstractCustomAction(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
void |
configure(CustomActionConfigurer configurer)
Configure the custom action.
|
void |
destroy()
Destroy is the last thing that gets called before the program is
shutdown.
|
protected CustomActionContext |
getContext() |
protected void |
initialize()
Classes derived from
AbstractCustomAction can override this method to initialize the CustomAction . |
void |
initialize(CustomActionContext context)
Initializes a Program.
|
protected void |
setDescription(String description) |
protected void |
setName(String name) |
protected void |
setProperties(Map<String,String> properties) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
run
protected AbstractCustomAction()
protected AbstractCustomAction(String name)
public final void configure(CustomActionConfigurer configurer)
CustomAction
configure
in interface CustomAction
configurer
- the CustomActionConfigurer
used to configure the action.protected void configure()
protected void setName(String name)
protected void setDescription(String description)
public final void initialize(CustomActionContext context) throws Exception
ProgramLifecycle
This method will be called only once per ProgramLifecycle
instance.
initialize
in interface ProgramLifecycle<CustomActionContext>
context
- An instance of RuntimeContext
Exception
- If there is any error during initialization.protected void initialize() throws Exception
AbstractCustomAction
can override this method to initialize the CustomAction
.Exception
- if there is any error in initializing the custom actionpublic void destroy()
ProgramLifecycle
destroy
in interface ProgramLifecycle<CustomActionContext>
protected final CustomActionContext getContext()
Copyright © 2022 Cask Data, Inc. Licensed under the Apache License, Version 2.0.