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

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by com.ibm.di.api.remote.impl.EventHandlerImpl
All Implemented Interfaces:
EventHandler, Serializable, Remote

public class EventHandlerImpl
extends UnicastRemoteObject
implements EventHandler

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface com.ibm.di.api.remote.EventHandler
EH_TYPE_NAME, EH_TYPE_SWITCHBOARD, EH_TYPE_TRIGGER
 
Method Summary
static EventHandlerImpl createInstance(EventHandler aLocalEventHandler, SessionImpl aSession)
           
 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.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getEventHandlerType

public int getEventHandlerType()
                        throws DIException,
                               RemoteException
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.
RemoteException - if a communication-related exception occurs.

getEventHandlerTypeName

public String getEventHandlerTypeName()
                               throws DIException,
                                      RemoteException
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.
RemoteException - if a communication-related exception occurs.

getConfigInstance

public ConfigInstance getConfigInstance()
                                 throws DIException,
                                        RemoteException
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.
RemoteException - if a communication-related exception occurs.

getName

public String getName()
               throws DIException,
                      RemoteException
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.
RemoteException - if a communication-related exception occurs.

getUniqueCode

public int getUniqueCode()
                  throws DIException,
                         RemoteException
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.
RemoteException - if a communication-related exception occurs.

getConfig

public EventHandlerConfig getConfig()
                             throws DIException,
                                    RemoteException
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.
RemoteException - if a communication-related exception occurs.

getStatistics

public TaskStatistics getStatistics()
                             throws DIException,
                                    RemoteException
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.
RemoteException - if a communication-related exception occurs.

stop

public void stop()
          throws DIException,
                 RemoteException
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.
RemoteException - if a communication-related exception occurs.

getSystemLogFilePath

public String getSystemLogFilePath()
                            throws DIException,
                                   RemoteException
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.
RemoteException - if a communication-related exception occurs.

getSystemLogFileName

public String getSystemLogFileName()
                            throws DIException,
                                   RemoteException
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.
RemoteException - if a communication-related exception occurs.

getSystemLog

public String getSystemLog()
                    throws DIException,
                           RemoteException
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.
RemoteException - if a communication-related exception occurs.

getSystemLogLastChunk

public String getSystemLogLastChunk(int aLastKilobytes)
                             throws DIException,
                                    RemoteException
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.
RemoteException - if a communication-related exception occurs.

createInstance

public static EventHandlerImpl createInstance(EventHandler aLocalEventHandler,
                                              SessionImpl aSession)
                                       throws DIException,
                                              RemoteException
Throws:
DIException
RemoteException

getGlobalUniqueID

public String getGlobalUniqueID()
                         throws DIException,
                                RemoteException
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.
Throws:
DIException - if an error occurs while obtaining the EventHandler GUID value.
RemoteException - if a communication-related exception occurs.