org.kitesdk.morphline.base
Class Notifications

java.lang.Object
  extended by org.kitesdk.morphline.base.Notifications

public final class Notifications
extends Object

Tools for notifications on the control plane.


Nested Class Summary
static class Notifications.LifecycleEvent
          Enumerations of the standard lifecycle events.
 
Field Summary
static String LIFE_CYCLE
          The field in which the notification of the lifecycle is stored.
static String LIFE_CYLCLE
          Deprecated. (since 0.10.1) Use LIFE_CYCLE instead.
 
Constructor Summary
Notifications()
           
 
Method Summary
static boolean containsLifecycleEvent(Record notification, Notifications.LifecycleEvent event)
          Determine whether or not the given notification contains the given lifecycle event.
static List getLifecycleEvents(Record notification)
          Get all lifecycle events from the given record.
static void notifyBeginTransaction(Command command)
          Notify the given command that a transaction has begun.
static void notifyCommitTransaction(Command command)
          Notify the given command that a transaction has been committed.
static void notifyRollbackTransaction(Command command)
          Notify the given command that a transaction has been rolled back.
static void notifyShutdown(Command command)
          Notify the given command that a shutdown command has been issued.
static void notifyStartSession(Command command)
          Notify the given command that a session has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIFE_CYCLE

public static final String LIFE_CYCLE
The field in which the notification of the lifecycle is stored.

Since:
0.10.1
See Also:
Constant Field Values

LIFE_CYLCLE

@Deprecated
public static final String LIFE_CYLCLE
Deprecated. (since 0.10.1) Use LIFE_CYCLE instead.
The field in which the notification of the lifecycle is stored.

See Also:
Constant Field Values
Constructor Detail

Notifications

public Notifications()
Method Detail

getLifecycleEvents

public static List getLifecycleEvents(Record notification)
Get all lifecycle events from the given record.

Returns:
A List of Notifications.LifecycleEvent enumerations representing all lifecycles stored in the given notification.

notifyBeginTransaction

public static void notifyBeginTransaction(Command command)
Notify the given command that a transaction has begun.

Parameters:
command - The Command to be notified.

notifyCommitTransaction

public static void notifyCommitTransaction(Command command)
Notify the given command that a transaction has been committed.

Parameters:
command - The Command to be notified.

notifyRollbackTransaction

public static void notifyRollbackTransaction(Command command)
Notify the given command that a transaction has been rolled back.

Parameters:
command - The Command to be notified.

notifyShutdown

public static void notifyShutdown(Command command)
Notify the given command that a shutdown command has been issued.

Parameters:
command - The Command to be notified.

notifyStartSession

public static void notifyStartSession(Command command)
Notify the given command that a session has started.

Parameters:
command - The Command to be notified.

containsLifecycleEvent

public static boolean containsLifecycleEvent(Record notification,
                                             Notifications.LifecycleEvent event)
Determine whether or not the given notification contains the given lifecycle event.

Parameters:
notification - A Record that represents a notification.
event - A Notifications.LifecycleEvent enumeration that is to be searched for in the given notification.


Copyright © 2013–2014. All rights reserved.