org.glassfish.grizzly
Interface IOStrategy
- All Superinterfaces:
- WorkerThreadPoolConfigProducer
- All Known Implementing Classes:
- AbstractIOStrategy, LeaderFollowerNIOStrategy, SameThreadIOStrategy, SimpleDynamicNIOStrategy, WorkerThreadIOStrategy
public interface IOStrategy
- extends WorkerThreadPoolConfigProducer
strategy is responsible for making decision how
Runnable task will be run: in current thread, worker thread.
strategy can make any other processing decisions.
- Author:
- Alexey Stashok
executeIoEvent
boolean executeIoEvent(Connection connection,
IOEvent ioEvent)
throws java.io.IOException
- The
SelectorRunner will invoke this
method to allow the strategy implementation to decide how the
IOEvent will be handled.
- Parameters:
connection - the Connection upon which the provided
IOEvent occurred.ioEvent - the IOEvent that triggered execution of this
strategy
- Returns:
- true, if this thread should keep processing IOEvents on
the current and other Connections, or false if this thread
should hand-off the farther IOEvent processing on any Connections,
which means IOStrategy is becoming responsible for continuing IOEvent
processing (possibly starting new thread, which will handle IOEvents).
- Throws:
java.io.IOException - if an error occurs processing the IOEvent.
Copyright © 2011 Oracle Corpration. All Rights Reserved.