org.eclipse.net4j.util.concurrent

## Class ExecutorWorkSerializer

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.net4j.util.concurrent.ExecutorWorkSerializer

- All Implemented Interfaces:
    IWorkSerializer, INotifier, IDeactivateable, ILifecycle, ILifecycle.DeferrableActivation

      public class ExecutorWorkSerializer
      extends Lifecycle
      implements IWorkSerializer

  Since:
    3.6
  Author:
    Eike Stepper

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `ILifecycle.DeferrableActivation`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecutorWorkSerializer()`
    `ExecutorWorkSerializer(java.util.concurrent.Executor executor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addWork(java.lang.Runnable runnable)`
    `void` | `dispose()`
    `protected void` | `doActivate()`
    `protected void` | `doBeforeActivate()`
    `protected void` | `doDeactivate()`
    `java.util.concurrent.Executor` | `getExecutor()`
    `protected void` | `handleException(java.lang.Runnable runnable, java.lang.Throwable ex)`
    `protected void` | `noWork()`
    `void` | `setExecutor(java.util.concurrent.Executor executor)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Constructor Detail

    - #### ExecutorWorkSerializer

          public ExecutorWorkSerializer()

    - #### ExecutorWorkSerializer

          public ExecutorWorkSerializer(java.util.concurrent.Executor executor)

  - ### Method Detail

    - #### getExecutor

          public java.util.concurrent.Executor getExecutor()

    - #### setExecutor

          public void setExecutor(java.util.concurrent.Executor executor)

    - #### addWork

          public boolean addWork(java.lang.Runnable runnable)

      Specified by:
        `addWork` in interface `IWorkSerializer`

    - #### dispose

          public void dispose()

      Specified by:
        `dispose` in interface `IWorkSerializer`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `Lifecycle`

    - #### handleException

          protected void handleException(java.lang.Runnable runnable,
                                         java.lang.Throwable ex)

    - #### noWork

          protected void noWork()

    - #### doBeforeActivate

          protected void doBeforeActivate()
                                   throws java.lang.Exception

      Overrides:
        `doBeforeActivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doActivate

          protected void doActivate()
                             throws java.lang.Exception

      Overrides:
        `doActivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doDeactivate

          protected void doDeactivate()
                               throws java.lang.Exception

      Overrides:
        `doDeactivate` in class `Lifecycle`
      Throws:
        `java.lang.Exception`

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html