com.ibm.di.eventhandler
Class Switchboard

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.di.server.Monitor
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Switchboard()
           
Switchboard(Switchboard server)
           
 
Method Summary
 void actionPerformed(ActionEvent event)
           
 void addEventListener(ActionListener l)
           
 void close()
           
 void debug(Object msg)
           
 void debugBreak(Object obj)
           
 void debugMsg(Object obj)
           
protected  boolean dispatchEvent(Entry entry)
           
 void dump(Object o)
           
 void dumpEntry(Entry entry)
           
 void dumpProperties()
           
 boolean enableDebug(int port)
           
 void exitProcess(Exception e)
           
 void exitProcess(String msg, Exception e)
           
 boolean exitRequested()
           
 boolean fireEvent(ActionEvent e)
           
 EventHandlerConfig getConfiguration()
           
 boolean getDebug()
           
 DebugServer getDebugger()
           
 EventHandlerListener getEventHandlerListener()
           
 String getExitMessage()
           
 boolean getExitRequested()
           
 SwitchboardInterceptor getInterceptor()
           
 Log getLog()
           
 String getLogCategory()
          Returns the log4j category name used by this eventhandler.
 String getNullBehavior()
          Return the null behavior value from the System.props
 String getNullBehaviorValue()
           
 String getNullDefinition()
          Return the null definition value from the System.props
 String getNullDefinitionValue()
           
 Object getParam(Object p1)
           
 RSInterface getParent()
           
 Object getProperty(Object p1)
           
 boolean getRecording()
           
 ScriptEngine getScriptEngine()
           
 Switchboard getServer()
           
 TaskStatistics getStats()
          Return the statistics object
 String getTaskName()
           
 void logmsg(Object msg)
           
 void logmsg(String level, String msg)
          This method logs a message with the specified level to the EventHandler log.
 void removeEventHandlerListener()
           
 void removeEventListener(ActionListener l)
           
 void setConfiguration(EventHandlerConfig config)
           
 void setDebug(boolean debug)
           
 void setDebugger(DebugServer debugger)
           
 void setEventHandlerListener(EventHandlerListener listener)
           
 void setExitMessage(String msg)
           
 void setExitRequested(boolean value)
           
 void setInterceptor(SwitchboardInterceptor interceptor)
          Sets the object that will hijack this EventHandler.
 void setLog(Log log)
           
 boolean setLogCategory(String categoryName)
          Sets the log4j category name used when requesting a logger.
 void setParam(Object p1, Object p2)
           
 void setParent(RSInterface parent)
           
 void setProperty(Object p1, Object p2)
           
 void setRecording(boolean on)
           
 void start()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.di.server.VersionInfoInterface
getVersion
 

Constructor Detail

Switchboard

public Switchboard()

Switchboard

public Switchboard(Switchboard server)
Method Detail

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