com.ibm.di.api.local.impl
Class EventHandlerImpl

java.lang.Object
  extended by com.ibm.di.api.local.impl.EventHandlerImpl
All Implemented Interfaces:
EventHandler

public class EventHandlerImpl
extends Object
implements EventHandler


Field Summary
 
Fields inherited from interface com.ibm.di.api.local.EventHandler
EH_TYPE_NAME, EH_TYPE_SWITCHBOARD, EH_TYPE_TRIGGER
 
Constructor Summary
EventHandlerImpl(Switchboard aSwitchboard, ConfigInstanceImpl aConfigInstance, SessionImpl aSession)
           
EventHandlerImpl(Trigger aTrigger, ConfigInstanceImpl aConfigInstance, SessionImpl aSession)
           
 
Method Summary
static String genGUID(Switchboard aSwitchboard)
           
static String genGUID(Trigger aTrigger)
           
 EventHandlerConfig getConfig()
          Returns configuration information about the EventHandler.
 ConfigInstance getConfigInstance()
          Returns the configuration instance of the EventHandler.
 int getEventHandlerType()
          Returns the EventHandler type.
 String getEventHandlerTypeName()
          Returns the EventHandler type name.
 String getGlobalUniqueID()
          Returns EventHandler GUID.
 String getName()
          Returns the name of the EventHandler.
 TaskStatistics getStatistics()
          This method returns the TaskStatistics object for this EventHandler.
 String getSystemLog()
          Retrieves the current EventHandler's system log.
 String getSystemLogFileName()
          Returns the name of the log file of the EventHandler (not prefixed by folders path).
 String getSystemLogFilePath()
          Returns the fully-qualified path of the log file of the EventHandler.
 String getSystemLogLastChunk(int aLastKilobytes)
          Retrieves the last chunk from the current EventHandler's system log.
 int getUniqueCode()
          Returns the unique code of the EventHandler.
 void stop()
          Stops the execution of the EventHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventHandlerImpl

public EventHandlerImpl(Switchboard aSwitchboard,
                        ConfigInstanceImpl aConfigInstance,
                        SessionImpl aSession)
                 throws DIException
Throws:
DIException

EventHandlerImpl

public EventHandlerImpl(Trigger aTrigger,
                        ConfigInstanceImpl aConfigInstance,
                        SessionImpl aSession)
                 throws DIException
Throws:
DIException
Method Detail

getEventHandlerType

public int getEventHandlerType()
                        throws DIException
Description copied from interface: EventHandler
Returns the EventHandler type. 0 is Trigger type and 1 is Switchboard type.

Specified by:
getEventHandlerType in interface EventHandler
Returns:
The type of the EventHandler as int.
Throws:
DIException - if an error occurs while retrieving the EventHandler type.

getEventHandlerTypeName

public String getEventHandlerTypeName()
                               throws DIException
Description copied from interface: EventHandler
Returns the EventHandler type name.

Specified by:
getEventHandlerTypeName in interface EventHandler
Returns:
String object representing the name of the EventHandler type.
Throws:
DIException - if an error occurs while retrieving EventHandler type name.

getConfigInstance

public ConfigInstance getConfigInstance()
                                 throws DIException
Description copied from interface: EventHandler
Returns the configuration instance of the EventHandler.

Specified by:
getConfigInstance in interface EventHandler
Returns:
ConfigInstance object representing the configuration instance of the EventHandler.
Throws:
DIException - if an error occurs while retrieving the configuration instance information.

getName

public String getName()
               throws DIException
Description copied from interface: EventHandler
Returns the name of the EventHandler.

Specified by:
getName in interface EventHandler
Returns:
String object representing the EventHandler’s name.
Throws:
DIException - if an error occurs while retrieving the name of the EventHandler.

getUniqueCode

public int getUniqueCode()
                  throws DIException
Description copied from interface: EventHandler
Returns the unique code of the EventHandler.

Specified by:
getUniqueCode in interface EventHandler
Returns:
int value representing the unique code of the EventHandler.
Throws:
DIException - if an error occurs while retrieving the unique code of the EventHandler.

getConfig

public EventHandlerConfig getConfig()
                             throws DIException
Description copied from interface: EventHandler
Returns configuration information about the EventHandler.

Specified by:
getConfig in interface EventHandler
Returns:
EventHandlerConfig representing the configuration information of the EventHandler.
Throws:
DIException - if an error occurs while retrieving the configuration information of the EventHandler.

getStatistics

public TaskStatistics getStatistics()
                             throws DIException
Description copied from interface: EventHandler
This method returns the TaskStatistics object for this EventHandler.

Specified by:
getStatistics in interface EventHandler
Returns:
The accumulated TaskStatistics object.
Throws:
DIException - if an error occurs while getting the EventHandler statistics.

stop

public void stop()
          throws DIException
Description copied from interface: EventHandler
Stops the execution of the EventHandler.

Specified by:
stop in interface EventHandler
Throws:
DIException - if an error occurs while stopping the EventHandler.

getSystemLogFilePath

public String getSystemLogFilePath()
                            throws DIException
Description copied from interface: EventHandler
Returns the fully-qualified path of the log file of the EventHandler.

Specified by:
getSystemLogFilePath in interface EventHandler
Returns:
the fully-qualified log file path.
Throws:
DIException - if an error occurs while obtaining EventHandler log file path.

getSystemLogFileName

public String getSystemLogFileName()
                            throws DIException
Description copied from interface: EventHandler
Returns the name of the log file of the EventHandler (not prefixed by folders path).

Specified by:
getSystemLogFileName in interface EventHandler
Returns:
the log file name.
Throws:
DIException - if an error occurs while obtaining EventHandler log file name.

getSystemLog

public String getSystemLog()
                    throws DIException
Description copied from interface: EventHandler
Retrieves the current EventHandler's system log.

Specified by:
getSystemLog in interface EventHandler
Returns:
the log generated by the EventHandler so far.
Throws:
DIException - if an error occurs while obtaining EventHandler's log.

getSystemLogLastChunk

public String getSystemLogLastChunk(int aLastKilobytes)
                             throws DIException
Description copied from interface: EventHandler
Retrieves the last chunk from the current EventHandler's system log.

Specified by:
getSystemLogLastChunk in interface EventHandler
Parameters:
aLastKilobytes - specifies in kilobytes the size of the log's last chunk that will be read.
Returns:
the last chunk of the EventHandler's log, generated so far.
Throws:
DIException - if an error occurs while obtaining EventHandler's log.

getGlobalUniqueID

public String getGlobalUniqueID()
Description copied from interface: EventHandler
Returns EventHandler GUID. The GUID is a string value that is unique for each component ever created by a particular TDI Server.

Specified by:
getGlobalUniqueID in interface EventHandler
Returns:
The EventHandler GUID value.

genGUID

public static String genGUID(Switchboard aSwitchboard)

genGUID

public static String genGUID(Trigger aTrigger)