Top Inners Fields Constructors Methods
org.glassfish.grizzly.strategies

public abstract Class AbstractIOStrategy

extends Object
implements IOStrategy
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.IOStrategy, org.glassfish.grizzly.strategies.WorkerThreadPoolConfigProducer
Known Direct Subclasses
org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy, org.glassfish.grizzly.strategies.SameThreadIOStrategy, org.glassfish.grizzly.strategies.WorkerThreadIOStrategy
Imports
java.io.IOException, java.util.EnumSet, java.util.concurrent.Executor, java.util.logging.Level, .Logger, org.glassfish.grizzly.Connection, .Context, .IOEvent, .IOEventLifeCycleListener, .IOStrategy, .Transport, org.glassfish.grizzly.asyncqueue.AsyncQueue, org.glassfish.grizzly.localization.LogMessages, org.glassfish.grizzly.threadpool.ThreadPoolConfig

Author
oleksiys

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
protected static final IOEventLifeCycleListener
private static final EnumSet<IOEvent>
private static final EnumSet<IOEvent>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ThreadPoolConfig
public final boolean
executeIoEvent(final Connection<L> connection, final IOEvent ioEvent)

Implements org.glassfish.grizzly.IOStrategy.executeIoEvent.

The org.glassfish.grizzly.nio.SelectorRunner will invoke this method to allow the strategy implementation to decide how the IOEvent will be handled.

protected static void
fireIOEvent(final Connection<L> connection, final IOEvent ioEvent, final IOEventLifeCycleListener listener, final Logger logger)

public Executor
getThreadPoolFor(final Connection<L> connection, final IOEvent ioEvent)

Implements org.glassfish.grizzly.IOStrategy.getThreadPoolFor.

Returns an Executor to be used to run given ioEvent processing for the given connection.

protected static boolean
isReadWrite(final IOEvent ioEvent)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ENABLE_INTEREST_LIFECYCLE_LISTENERback to summary
protected static final IOEventLifeCycleListener ENABLE_INTEREST_LIFECYCLE_LISTENER
READ_WRITE_EVENT_SETback to summary
private static final EnumSet<IOEvent> READ_WRITE_EVENT_SET
WORKER_THREAD_EVENT_SETback to summary
private static final EnumSet<IOEvent> WORKER_THREAD_EVENT_SET

Constructor Detail

AbstractIOStrategyback to summary
public AbstractIOStrategy()

Method Detail

createDefaultWorkerPoolConfigback to summary
public ThreadPoolConfig createDefaultWorkerPoolConfig(final Transport transport)

Implements org.glassfish.grizzly.strategies.WorkerThreadPoolConfigProducer.createDefaultWorkerPoolConfig.

Annotations
@Override
executeIoEventback to summary
public final boolean executeIoEvent(final Connection<L> connection, final IOEvent ioEvent) throws IOException

Implements org.glassfish.grizzly.IOStrategy.executeIoEvent.

Doc from org.glassfish.grizzly.IOStrategy.executeIoEvent.

The org.glassfish.grizzly.nio.SelectorRunner will invoke this method to allow the strategy implementation to decide how the IOEvent will be handled.

Annotations
@Override
Exceptions
IOException:
if an error occurs processing the IOEvent.
fireIOEventback to summary
protected static void fireIOEvent(final Connection<L> connection, final IOEvent ioEvent, final IOEventLifeCycleListener listener, final Logger logger)
getThreadPoolForback to summary
public Executor getThreadPoolFor(final Connection<L> connection, final IOEvent ioEvent)

Implements org.glassfish.grizzly.IOStrategy.getThreadPoolFor.

Doc from org.glassfish.grizzly.IOStrategy.getThreadPoolFor.

Returns an Executor to be used to run given ioEvent processing for the given connection. A null value will be returned if the ioEvent should be executed in the kernel thread.

Annotations
@Override
isReadWriteback to summary
protected static boolean isReadWrite(final IOEvent ioEvent)
org.glassfish.grizzly.strategies back to summary

private final Class AbstractIOStrategy.EnableInterestLifeCycleListener

extends Adapter
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public void
Inherited from org.glassfish.grizzly.IOEventLifeCycleListener.Adapter:
onContextManualIOEventControlonContextResumeonContextSuspendonErroronLeaveonNotRunonRerunonTerminate

Constructor Detail

EnableInterestLifeCycleListenerback to summary
private EnableInterestLifeCycleListener()

Method Detail

onCompleteback to summary
public void onComplete(final Context context, final Object data) throws IOException

Overrides org.glassfish.grizzly.IOEventLifeCycleListener.Adapter.onComplete.

Implements org.glassfish.grizzly.IOEventLifeCycleListener.onComplete.

Doc from org.glassfish.grizzly.IOEventLifeCycleListener.Adapter.onComplete.

IOEvent processing completed.

Annotations
@Override
Exceptions
IOException:

Doc from org.glassfish.grizzly.IOEventLifeCycleListener.onComplete.

on error

onReregisterback to summary
public void onReregister(final Context context) throws IOException

Overrides org.glassfish.grizzly.IOEventLifeCycleListener.Adapter.onReregister.

Implements org.glassfish.grizzly.IOEventLifeCycleListener.onReregister.

Doc from org.glassfish.grizzly.IOEventLifeCycleListener.Adapter.onReregister.

Reregister IOEvent interest.

Annotations
@Override
Exceptions
IOException:

Doc from org.glassfish.grizzly.IOEventLifeCycleListener.onReregister.

on error