Top Description Inners Methods
org.glassfish.grizzly.http.server

public Interface RequestExecutorProvider

Known Direct Implementers
org.glassfish.grizzly.http.server.RequestExecutorProvider.SameThreadProvider, org.glassfish.grizzly.http.server.RequestExecutorProvider.WorkerThreadProvider
Imports
java.util.concurrent.Executor, org.glassfish.grizzly.threadpool.Threads

An implementation of this interface will be responsible for executing user's code in HttpHandler#service(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response) and notifying ReadHandler, WriteHandler registered by the user.
Author
Alexey Stashok

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
RequestExecutorProvider.SameThreadProvider

The RequestExecutorProvider implementation, which always returns null to force the user code to be executed on the current Thread.

public static class
RequestExecutorProvider.WorkerThreadProvider

The RequestExecutorProvider implementation, which checks if the current Thread is a service Thread (see Threads#isService()).

Method Summary

Modifier and TypeMethod and Description
public Executor

Returns:

the Executor to execute user's code associated with the Request processing, or null if the Request has to be executed on the current Thread
getExecutor
(final Request request)

Returns the Executor to execute user's code associated with the Request processing.

Method Detail

getExecutorback to summary
public Executor getExecutor(final Request request)

Returns the Executor to execute user's code associated with the Request processing.

Parameters
request:Request

Request

Returns:Executor

the Executor to execute user's code associated with the Request processing, or null if the Request has to be executed on the current Thread

org.glassfish.grizzly.http.server back to summary

public Class RequestExecutorProvider.SameThreadProvider

extends Object
implements RequestExecutorProvider
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.http.server.RequestExecutorProvider.SameThreadProvider
All Implemented Interfaces
org.glassfish.grizzly.http.server.RequestExecutorProvider

The RequestExecutorProvider implementation, which always returns null to force the user code to be executed on the current Thread.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Executor
getExecutor(final Request request)

Implements org.glassfish.grizzly.http.server.RequestExecutorProvider.getExecutor.

Returns the Executor to execute user's code associated with the Request processing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SameThreadProviderback to summary
public SameThreadProvider()

Method Detail

getExecutorback to summary
public Executor getExecutor(final Request request)

Implements org.glassfish.grizzly.http.server.RequestExecutorProvider.getExecutor.

Doc from org.glassfish.grizzly.http.server.RequestExecutorProvider.getExecutor.

Returns the Executor to execute user's code associated with the Request processing.

Annotations
@Override
org.glassfish.grizzly.http.server back to summary

public Class RequestExecutorProvider.WorkerThreadProvider

extends Object
implements RequestExecutorProvider
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.http.server.RequestExecutorProvider.WorkerThreadProvider
All Implemented Interfaces
org.glassfish.grizzly.http.server.RequestExecutorProvider

The RequestExecutorProvider implementation, which checks if the current Thread is a service Thread (see Threads#isService()). If the current Thread is a service Thread - the implementation returns a worker thread pool associated with the Request, or, if the current Thread is not a service Thread - null will be returned to force the user code to be executed on the current Thread.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Executor
getExecutor(final Request request)

Implements org.glassfish.grizzly.http.server.RequestExecutorProvider.getExecutor.

Returns the Executor to execute user's code associated with the Request processing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

WorkerThreadProviderback to summary
public WorkerThreadProvider()

Method Detail

getExecutorback to summary
public Executor getExecutor(final Request request)

Implements org.glassfish.grizzly.http.server.RequestExecutorProvider.getExecutor.

Doc from org.glassfish.grizzly.http.server.RequestExecutorProvider.getExecutor.

Returns the Executor to execute user's code associated with the Request processing.

Annotations
@Override