|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.strategies.WorkerThreadStrategy
public class WorkerThreadStrategy
Strategy, which executes Processors in worker thread.
| Constructor Summary | |
|---|---|
WorkerThreadStrategy(Executor sameThreadProcessorExecutor,
Executor workerThreadProcessorExecutor)
|
|
WorkerThreadStrategy(Transport transport)
|
|
| Method Summary | |
|---|---|
void |
executeProcessor(Object strategyContext,
ProcessorRunnable processorRunnable)
Execute ProcessorRunnable task. |
boolean |
isTerminateThread(Object strategyContext)
This method may be called by runner Thread after task will be
executed. |
Object |
prepare(Connection connection,
IOEvent ioEvent)
Prepare Strategy for processing IOEvent, occured on the
Connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkerThreadStrategy(Transport transport)
public WorkerThreadStrategy(Executor sameThreadProcessorExecutor,
Executor workerThreadProcessorExecutor)
| Method Detail |
|---|
public Object prepare(Connection connection,
IOEvent ioEvent)
Strategy for processing IOEvent, occured on the
Connection.
At this phase Strategy may initialize and return context data,
which will be passed further into executeProcessor and isTerminateThread
methods.
prepare in interface Strategyconnection - Connection, on which IOEvent occured.ioEvent - IOEvent.
IOEvent processing.
public void executeProcessor(Object strategyContext,
ProcessorRunnable processorRunnable)
throws IOException
ProcessorRunnable task.
executeProcessor in interface StrategystrategyContext - context object, initialized on "prepare" phase.processorRunnable - the ProcessorRunnable task to be executed.
IOExceptionpublic boolean isTerminateThread(Object strategyContext)
Thread after task will be
executed. Strategy may instruct the caller to release current
thread, after task execution will be completed.
isTerminateThread in interface StrategystrategyContext - Strategy context, initialized on "prepare"
phase.
Thread, or false otherwise.LeaderFollowerStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||