com.ibm.di.eventhandler
Class DSMLv2EventHandler

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.di.server.Monitor
          extended by com.ibm.di.eventhandler.Switchboard
              extended by com.ibm.di.eventhandler.DSMLv2EventHandler
All Implemented Interfaces:
TaskInterface, VersionInfoInterface, ActionListener, Runnable, EventListener

public class DSMLv2EventHandler
extends Switchboard
implements TaskInterface


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String ATTR_NAME_BATCH_REQUEST
           
static String ATTR_NAME_BATCH_RESPONSE
           
static String PARAMETER_BINARY_ATTRIBUTES
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DSMLv2EventHandler()
          Constructor for DSMLv2EventHandler.
DSMLv2EventHandler(Socket socket, DSMLv2EventHandler parent)
          Constructor used by listener thread to handle incoming requests.
 
Method Summary
 boolean dispatchEvent(Entry aEntry)
          Dispatch incoming DSMLv2 event
 Object getConfig(String param)
          Retrieves specific configuration parameter
 AssemblyLineComponent getConnector(String connector)
          Retrieves connector component
 Entry getResult()
          Retrieves result entry
 String getVersion()
           
 Entry getWork()
          Retrieves work entry
 void init()
          Perform per thread initialization.
 boolean isChunked()
          Checks whether the message will be chunked
 void processRequest()
          Process incoming request.
 void run()
          Starts DSMLv2 Event Handler
protected  void runEpilog(Entry aEventEntry)
          Runs epilog script of Dsmlv2 EventHandler
protected  void runProlog(Entry aEventEntry)
          Runs prolog script of Dsmlv2 EventHandler
 void setExitRequested(boolean value)
          Force DSMLv2 Event Handler termination
 
Methods inherited from class com.ibm.di.eventhandler.Switchboard
actionPerformed, addEventListener, close, debug, debugBreak, debugMsg, dump, dumpEntry, dumpProperties, enableDebug, exitProcess, exitProcess, exitRequested, fireEvent, getConfiguration, getDebug, getDebugger, getEventHandlerListener, getExitMessage, getExitRequested, getInterceptor, getLog, getLogCategory, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParam, getParent, getProperty, getRecording, getScriptEngine, getServer, getStats, getTaskName, logmsg, logmsg, removeEventHandlerListener, removeEventListener, setConfiguration, setDebug, setDebugger, setEventHandlerListener, setExitMessage, setInterceptor, setLog, setLogCategory, setParam, setParent, setProperty, setRecording, 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, 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.TaskInterface
debugBreak, debugMsg, getLog, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParent, getScriptEngine, logmsg
 

Field Detail

PARAMETER_BINARY_ATTRIBUTES

public static final String PARAMETER_BINARY_ATTRIBUTES
See Also:
Constant Field Values

ATTR_NAME_BATCH_REQUEST

public static final String ATTR_NAME_BATCH_REQUEST
See Also:
Constant Field Values

ATTR_NAME_BATCH_RESPONSE

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

DSMLv2EventHandler

public DSMLv2EventHandler()
Constructor for DSMLv2EventHandler.


DSMLv2EventHandler

public DSMLv2EventHandler(Socket socket,
                          DSMLv2EventHandler parent)
Constructor used by listener thread to handle incoming requests.

Parameters:
socket - connection socket
parent - parent event handler
Method Detail

setExitRequested

public void setExitRequested(boolean value)
Force DSMLv2 Event Handler termination

Overrides:
setExitRequested in class Switchboard
Parameters:
value - Boolean value. True - forse termination, false otherwise.
See Also:
Switchboard.setExitRequested(boolean)

getConnector

public AssemblyLineComponent getConnector(String connector)
Retrieves connector component

Specified by:
getConnector in interface TaskInterface
Parameters:
connector - Connector name which will be retrieved

getConfig

public Object getConfig(String param)
Retrieves specific configuration parameter

Specified by:
getConfig in interface TaskInterface
Parameters:
param - Configuration parameter name

getResult

public Entry getResult()
Retrieves result entry

Specified by:
getResult in interface TaskInterface

getWork

public Entry getWork()
Retrieves work entry

Specified by:
getWork in interface TaskInterface

isChunked

public boolean isChunked()
Checks whether the message will be chunked


run

public void run()
Starts DSMLv2 Event Handler

Specified by:
run in interface Runnable
Overrides:
run in class Thread

init

public void init()
Perform per thread initialization.


processRequest

public void processRequest()
                    throws Exception
Process incoming request.

Throws:
Exception

dispatchEvent

public boolean dispatchEvent(Entry aEntry)
                      throws Exception
Dispatch incoming DSMLv2 event

Overrides:
dispatchEvent in class Switchboard
Parameters:
aEntry - Entry with specific tcp/http information
Throws:
Exception

runProlog

protected void runProlog(Entry aEventEntry)
                  throws Exception
Runs prolog script of Dsmlv2 EventHandler

Parameters:
aEventEntry - Entry passed to the script engine
Throws:
Exception

runEpilog

protected void runEpilog(Entry aEventEntry)
                  throws Exception
Runs epilog script of Dsmlv2 EventHandler

Parameters:
aEventEntry - Entry passed to the script engine
Throws:
Exception

getVersion

public String getVersion()
Specified by:
getVersion in interface VersionInfoInterface
See Also:
VersionInfoInterface.getVersion()