com.ibm.di.api.jmx.mbeans
Class EventHandler

java.lang.Object
  extended by com.ibm.di.api.jmx.mbeans.BaseAdmin
      extended by com.ibm.di.api.jmx.mbeans.EventHandler
All Implemented Interfaces:
BaseAdminMBean, BaseMBean, EventHandlerMBean

public class EventHandler
extends BaseAdmin
implements EventHandlerMBean


Field Summary
static String MBEAN_TYPE
           
 
Constructor Summary
EventHandler(EventHandler aEventHandler)
           
 
Method Summary
static javax.management.ObjectName genObjectName(String aName, int aUniqueCode)
           
 EventHandlerConfig getConfig()
          Returns configuration information about the EventHandler.
 javax.management.ObjectName getConfigInstance()
          Returns ObjectName generated from the EventHandler’s configuration ID, gotten from the EventHandler’s configuration instance.
 Integer getEventHandlerType()
          Returns the EventHandler type.
 String getEventHandlerTypeName()
          Returns the EventHandler type name.
 String getGlobalUniqueID()
          Returns EventHandler GUID.
 String getId()
          Reads attribute "Id".
 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(Integer aLastKilobytes)
          Retrieves the last chunk from the current EventHandler's system log.
 String getType()
          Reads attribute "Type".
 Integer getUniqueCode()
          Returns the unique code of the EventHandler.
 void stop()
          Stops the execution of the EventHandler.
 
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_TYPE

public static final String MBEAN_TYPE
See Also:
Constant Field Values
Constructor Detail

EventHandler

public EventHandler(EventHandler aEventHandler)
             throws DIException
Throws:
DIException
Method Detail

getType

public String getType()
Description copied from interface: BaseMBean
Reads attribute "Type".

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getType in interface BaseMBean
Returns:
the type of this MBean.

getId

public String getId()
Description copied from interface: BaseMBean
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getId in interface BaseMBean
Returns:
the Id of this MBean.

getEventHandlerType

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

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

getEventHandlerTypeName

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

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

getConfigInstance

public javax.management.ObjectName getConfigInstance()
                                              throws DIException
Description copied from interface: EventHandlerMBean
Returns ObjectName generated from the EventHandler’s configuration ID, gotten from the EventHandler’s configuration instance.

Specified by:
getConfigInstance in interface EventHandlerMBean
Returns:
ObjectName object generated from the EventHandler’s configuration ID.
Throws:
DIException - if an error occurs while generating the ObjectName.

getName

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

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

getUniqueCode

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

Specified by:
getUniqueCode in interface EventHandlerMBean
Returns:
Integer object 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: EventHandlerMBean
Returns configuration information about the EventHandler.

Specified by:
getConfig in interface EventHandlerMBean
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: EventHandlerMBean
This method returns the TaskStatistics object for this EventHandler.

Specified by:
getStatistics in interface EventHandlerMBean
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: EventHandlerMBean
Stops the execution of the EventHandler.

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

getSystemLogFilePath

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

Specified by:
getSystemLogFilePath in interface EventHandlerMBean
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: EventHandlerMBean
Returns the name of the log file of the EventHandler (not prefixed by folders path).

Specified by:
getSystemLogFileName in interface EventHandlerMBean
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: EventHandlerMBean
Retrieves the current EventHandler's system log.

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

getSystemLogLastChunk

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

Specified by:
getSystemLogLastChunk in interface EventHandlerMBean
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.

genObjectName

public static javax.management.ObjectName genObjectName(String aName,
                                                        int aUniqueCode)
                                                 throws DIException
Throws:
DIException

getGlobalUniqueID

public String getGlobalUniqueID()
                         throws DIException
Description copied from interface: EventHandlerMBean
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 EventHandlerMBean
Returns:
The EventHandler GUID value.
Throws:
DIException - if an error occurs while obtaining GUID.