Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty.grizzly
Class JettySelectorThread

    java.lang.Object
      SelectorThread
          org.mortbay.jetty.grizzly.JettySelectorThread

Direct Known Subclasses:
  JettyMultiSelectorThread

    public class JettySelectorThread

extends SelectorThread

Extend the default Grizzly implementation to allow the customization of `Task` used by the Jetty back-end

Author:
  Jeanfrancois Arcand

Constructor Summary
`JettySelectorThread()`

Method Summary
`void` | `enableSelectionKeys()` Enable all registered interestOps.
`protected void` | `expireIdleKeys()` Cancel keep-alive connections.
`GrizzlyConnector` | `getGrizzlyConnector()`
`ReadTask` | `getReadTask()`
`protected void` | `initAlgorithm()` Force Grizzly to use the `JettyStreamAlgorithm` implementation by default.
`protected void` | `initMultiSelectors()` Initialize `JeetySelectorReadThread` used to process OP_READ operations.
`boolean` | `isUseTemporarySelector()`
`protected Pipeline` | `newPipeline(int maxThreads, int minThreads, String name, int port, int priority)` Create a new `Pipeline` instance using the `pipelineClassName` value.
`ProcessorTask` | `newProcessorTask(boolean initialize)` Return a `JettyProcessorTask` implementation.
`protected ReadTask` | `newReadTask()` Return a new `JettyReadTask` instance
`void` | `setGrizzlyConnector(GrizzlyConnector grizzlyConnector)`
`void` | `setThreadPool(ThreadPool threadPool)`
`void` | `setUseTemporarySelector(boolean useTemporarySelector)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JettySelectorThread

    public JettySelectorThread()

Method Detail

### initMultiSelectors

    protected void initMultiSelectors()
                               throws IOException,
                                      InstantiationException

  Initialize `JeetySelectorReadThread` used to process OP_READ operations.

  Throws:
    `IOException`
    `InstantiationException`

### initAlgorithm

    protected void initAlgorithm()

  Force Grizzly to use the `JettyStreamAlgorithm` implementation by default.

### newPipeline

    protected Pipeline newPipeline(int maxThreads,
                                   int minThreads,
                                   String name,
                                   int port,
                                   int priority)

  Create a new `Pipeline` instance using the `pipelineClassName` value. If the pipeline is an instance of `JettyPipeline`, use the Jetty thread pool implementation (wrapped inside a Pipeline).

### newProcessorTask

    public ProcessorTask newProcessorTask(boolean initialize)

  Return a `JettyProcessorTask` implementation.

### enableSelectionKeys

    public void enableSelectionKeys()

  Enable all registered interestOps. Due a a NIO bug, all interestOps invokation needs to occurs on the same thread as the selector thread.

### expireIdleKeys

    protected void expireIdleKeys()

  Cancel keep-alive connections.

### newReadTask

    protected ReadTask newReadTask()

  Return a new `JettyReadTask` instance

### getReadTask

    public ReadTask getReadTask()
                         throws IOException

  Throws:
    `IOException`

### setGrizzlyConnector

    public void setGrizzlyConnector(GrizzlyConnector grizzlyConnector)

### getGrizzlyConnector

    public GrizzlyConnector getGrizzlyConnector()

### setThreadPool

    public void setThreadPool(ThreadPool threadPool)

### isUseTemporarySelector

    public boolean isUseTemporarySelector()

### setUseTemporarySelector

    public void setUseTemporarySelector(boolean useTemporarySelector)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.