com.ibm.di.eventhandler
Class Switchboard
java.lang.Object
java.lang.Thread
com.ibm.di.server.Monitor
com.ibm.di.eventhandler.Switchboard
All Implemented Interfaces: VersionInfoInterface , ActionListener , Runnable , EventListener
Direct Known Subclasses: ADLDAPSwitchboard , ConnectorSwitchboard , DSMLv2EventHandler , ExchangeLDAPSwitchboard , HTTPSwitchboard , IBMLDAPSwitchboard , LDAPServerEventHandler , LDAPSwitchboard , MailboxSwitchboard , SNMPEventHandler , TCPSwitchboard , zOSLDAPSwitchboard
public abstract class Switchboard extends Monitor implements ActionListener , VersionInfoInterface
The Switchboard class provides the base class for EventHandler implementations. This class provides
common methods and properties that apply to all EventHandlers.
Methods inherited from class com.ibm.di.server.Monitor
addActionListener , addThread , allThreadsStopped , fireListener , removeActionListener , removeThread , runningALs , runningEHs , setMonitorMessage , threadStarted , threadStopped
Methods inherited from class java.lang.Thread
activeCount , checkAccess , countStackFrames , currentThread , destroy , dumpStack , enumerate , getAllStackTraces , getContextClassLoader , getDefaultUncaughtExceptionHandler , getId , getName , getPriority , getStackTrace , getState , getThreadGroup , getUncaughtExceptionHandler , holdsLock , interrupt , interrupted , isAlive , isDaemon , isInterrupted , join , join , join , resume , run , setContextClassLoader , setDaemon , setDefaultUncaughtExceptionHandler , setName , setPriority , setUncaughtExceptionHandler , sleep , sleep , stop , stop , suspend , toString , yield
Switchboard
public Switchboard ()
Switchboard
public Switchboard (Switchboard server)
setInterceptor
public void setInterceptor (SwitchboardInterceptor interceptor)
Sets the object that will hijack this EventHandler. E.g. no dispatchEvent calls will ever be forwarded
to the configured action maps.
getInterceptor
public SwitchboardInterceptor getInterceptor ()
setEventHandlerListener
public void setEventHandlerListener (EventHandlerListener listener)
getEventHandlerListener
public EventHandlerListener getEventHandlerListener ()
removeEventHandlerListener
public void removeEventHandlerListener ()
setRecording
public void setRecording (boolean on)
getRecording
public boolean getRecording ()
close
public void close ()
getTaskName
public String getTaskName ()
enableDebug
public boolean enableDebug (int port)
throws Exception
Throws:
Exception
getDebugger
public DebugServer getDebugger ()
setDebugger
public void setDebugger (DebugServer debugger)
debugBreak
public void debugBreak (Object obj)
throws Exception
Throws:
Exception
debugMsg
public void debugMsg (Object obj)
throws Exception
Throws:
Exception
exitProcess
public void exitProcess (Exception e)
exitProcess
public void exitProcess (String msg,
Exception e)
getExitRequested
public boolean getExitRequested ()
setExitRequested
public void setExitRequested (boolean value)
exitRequested
public boolean exitRequested ()
getExitMessage
public String getExitMessage ()
setExitMessage
public void setExitMessage (String msg)
setParent
public void setParent (RSInterface parent)
getParent
public RSInterface getParent ()
getServer
public Switchboard getServer ()
setDebug
public void setDebug (boolean debug)
getDebug
public boolean getDebug ()
getScriptEngine
public ScriptEngine getScriptEngine ()
setConfiguration
public void setConfiguration (EventHandlerConfig config)
getLog
public Log getLog ()
setLog
public void setLog (Log log)
getConfiguration
public EventHandlerConfig getConfiguration ()
getParam
public Object getParam (Object p1)
setParam
public void setParam (Object p1,
Object p2)
setProperty
public void setProperty (Object p1,
Object p2)
getProperty
public Object getProperty (Object p1)
logmsg
public void logmsg (String level,
String msg)
This method logs a message with the specified level to the EventHandler log.
Parameters: level
- Loglevel. Legal values are FATAL, ERROR, WARN, INFO, DEBUG.
Unrecognized keyword means DEBUG.msg
- The message
logmsg
public void logmsg (Object msg)
debug
public void debug (Object msg)
dump
public void dump (Object o)
dumpEntry
public void dumpEntry (Entry entry)
actionPerformed
public void actionPerformed (ActionEvent event)
Specified by: actionPerformed
in interface ActionListener
dumpProperties
public void dumpProperties ()
dispatchEvent
protected boolean dispatchEvent (Entry entry)
throws Exception
Throws:
Exception
addEventListener
public void addEventListener (ActionListener l)
removeEventListener
public void removeEventListener (ActionListener l)
fireEvent
public boolean fireEvent (ActionEvent e)
getNullBehavior
public String getNullBehavior ()
Return the null behavior value from the System.props
getNullBehaviorValue
public String getNullBehaviorValue ()
getNullDefinition
public String getNullDefinition ()
Return the null definition value from the System.props
getNullDefinitionValue
public String getNullDefinitionValue ()
getStats
public TaskStatistics getStats ()
Return the statistics object
getLogCategory
public String getLogCategory ()
Returns the log4j category name used by this eventhandler.
setLogCategory
public boolean setLogCategory (String categoryName)
Sets the log4j category name used when requesting a logger. If a logger object has been provided
to the EH already this method returns false to signal that setting the value has no effect.
Parameters: categoryName
- The logj4 category name
Returns: True if setting the value will have effect.
start
public void start ()
Overrides: start
in class Thread