public abstract class EventHandler extends Object
TwillRunnable lifecycle events.| Modifier and Type | Class and Description |
|---|---|
static class |
EventHandler.TimeoutAction
Represents action to act upon runnable launch timeout.
|
static class |
EventHandler.TimeoutEvent
This class holds information about a launch timeout event.
|
| Modifier and Type | Field and Description |
|---|---|
protected EventHandlerContext |
context |
| Constructor and Description |
|---|
EventHandler() |
| Modifier and Type | Method and Description |
|---|---|
EventHandlerSpecification |
configure()
Returns an
EventHandlerSpecification for configuring this handler class. |
void |
destroy()
Invoked by the application when shutting down.
|
protected Map<String,String> |
getConfigs()
Returns set of configurations available at runtime for access.
|
void |
initialize(EventHandlerContext context)
Invoked by the application to initialize this EventHandler instance.
|
abstract EventHandler.TimeoutAction |
launchTimeout(Iterable<EventHandler.TimeoutEvent> timeoutEvents)
Invoked when the number of expected instances doesn't match with number of actual instances.
|
protected EventHandlerContext context
public EventHandlerSpecification configure()
EventHandlerSpecification for configuring this handler class.public void initialize(EventHandlerContext context)
context - context object for accessing the event handler execution context.public void destroy()
public abstract EventHandler.TimeoutAction launchTimeout(Iterable<EventHandler.TimeoutEvent> timeoutEvents)
timeoutEvents - An Iterable of EventHandler.TimeoutEvent that contains information about runnable launch timeout.EventHandler.TimeoutAction to govern action to act.Copyright © 2013-2015 The Apache Software Foundation. All rights reserved.