HPSearch

cgl.hpsearch.engine
Class RequestHandler

java.lang.Object
  extended byjava.lang.Thread
      extended bycgl.hpsearch.engine.RequestHandler
All Implemented Interfaces:
Runnable, SystemConstants

public class RequestHandler
extends Thread
implements SystemConstants

RequestHandler runs the StreamHandler and helps to connect resource with a stream

Author:
Harshawardhan S. Gadgil Date: Feb 2, 2004

Field Summary
 TaskSchedulerEngine engine
           
 String flowIDofComponent
           
 String id
           
 String requestingEngineId
           
 String taskId
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface cgl.hpsearch.common.SystemConstants
ABANDON_HANDLER, ABANDONED, BROKER_HOST, BROKER_PORT, BUF_SIZE, EOT, EXCEPTION, FAILURE, FILESEPARTOR, FLOW_LOGGING_MANAGER, FLOW_MANAGER, HPSEARCH_CONFIG, HPSEARCH_HOME, HPSEARCH_SHELL, HPSEARCH_WS, MARKER, NB_HOME, NB_PERFORMANCE_DATA_TOPIC, OS_TYPE, OS_UNIX, OS_WIN, PORT, PROTOCOL, READY, RESUME, RUNNING, SCRIPT_ARGS, SCRIPT_PATH, SHELLWS_PORT, START_HANDLER, STREAM_MARKER_DATA, STREAM_MARKER_EOF, STX, SUCCESS, SUSPEND, TASK_DEFINED, TASK_SCHEDULER_ENGINE, TASKSCHEDULER_AUTO_CONNECT_COMM_LINK, TASKSCHEDULER_ENGINE_COMM_LINK, THREAD_SLEEP_INTERVAL, UNKNOWN, WAITING, WSCONTEXT_RESULT_BIN, WSCONTEXT_SERVICE
 
Constructor Summary
RequestHandler(String _request, String taskID, FlowHandler _flowHandler)
          Constructor to init requesthandler if initialized by a TaskScheduler
RequestHandler(String _request, String taskid, String _rhID, TaskSchedulerEngine myengine)
          Constructor to init requesthandler if initialized by a TaskScheduler
 
Method Summary
 int getActivityStatus()
           
 String getRequestHandlerId()
           
 void handleAction(String action)
          Handles the action sent by the requestor
Valid actions are "start", "stop", ... maybe more 'll be added in future.
 void handlerFinished(int _activityStatus)
          Tells the executing engine that the RequestHandler is done with its job.
 void notifyEngine(int status, String notification)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

engine

public TaskSchedulerEngine engine

requestingEngineId

public String requestingEngineId

flowIDofComponent

public String flowIDofComponent

taskId

public String taskId

id

public String id
Constructor Detail

RequestHandler

public RequestHandler(String _request,
                      String taskid,
                      String _rhID,
                      TaskSchedulerEngine myengine)
               throws Exception
Constructor to init requesthandler if initialized by a TaskScheduler

Parameters:
_request -
taskid -
_rhID -
myengine -
Throws:
Exception

RequestHandler

public RequestHandler(String _request,
                      String taskID,
                      FlowHandler _flowHandler)
Constructor to init requesthandler if initialized by a TaskScheduler

Parameters:
_request -
Throws:
Exception
Method Detail

getRequestHandlerId

public String getRequestHandlerId()

handleAction

public void handleAction(String action)
Handles the action sent by the requestor
Valid actions are "start", "stop", ... maybe more 'll be added in future.

Parameters:
action - String representing the action

handlerFinished

public void handlerFinished(int _activityStatus)
Tells the executing engine that the RequestHandler is done with its job.

Parameters:
_activityStatus - An integer representing the completion status

getActivityStatus

public int getActivityStatus()

notifyEngine

public void notifyEngine(int status,
                         String notification)

run

public void run()
Specified by:
run in interface Runnable

HPSearch

For comments and suggestions please send e-mail to Harshawardhan Gadgil
Last updated: June 9 2006