org.jboss.resteasy.core

## Class SynchronousExecutionContext

- java.lang.Object
- - org.jboss.resteasy.core.AbstractExecutionContext
  - - org.jboss.resteasy.core.SynchronousExecutionContext

- All Implemented Interfaces:
    ResteasyAsynchronousContext

      public class SynchronousExecutionContext
      extends AbstractExecutionContext

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `SynchronousExecutionContext.SynchronousAsynchronousResponse`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ResteasyAsynchronousResponse` | `asynchronousResponse`
    `protected boolean` | `done`
    `protected Object` | `responseLock`
    `protected CountDownLatch` | `syncLatch`
    `protected long` | `timeout`
    `protected TimeUnit` | `timeoutUnit`
    `protected boolean` | `wasSuspended`

    - ### Fields inherited from class org.jboss.resteasy.core.AbstractExecutionContext

      `dispatcher, request, response`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SynchronousExecutionContext(SynchronousDispatcher dispatcher, HttpRequest request, HttpResponse response)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ResteasyAsynchronousResponse` | `getAsyncResponse()`
    `boolean` | `isSuspended()`
    `ResteasyAsynchronousResponse` | `suspend()`
    `ResteasyAsynchronousResponse` | `suspend(long millis)`
    `ResteasyAsynchronousResponse` | `suspend(long time, TimeUnit unit)`

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

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

- - ### Field Detail

    - #### syncLatch

          protected final CountDownLatch syncLatch

    - #### timeout

          protected long timeout

    - #### timeoutUnit

          protected TimeUnit timeoutUnit

    - #### wasSuspended

          protected boolean wasSuspended

    - #### done

          protected volatile boolean done

    - #### responseLock

          protected Object responseLock

    - #### asynchronousResponse

          protected ResteasyAsynchronousResponse asynchronousResponse

  - ### Constructor Detail

    - #### SynchronousExecutionContext

          public SynchronousExecutionContext(SynchronousDispatcher dispatcher,
                                     HttpRequest request,
                                     HttpResponse response)

  - ### Method Detail

    - #### suspend

          public ResteasyAsynchronousResponse suspend()
                                               throws IllegalStateException

      Throws:
        `IllegalStateException`

    - #### suspend

          public ResteasyAsynchronousResponse suspend(long millis)
                                               throws IllegalStateException

      Throws:
        `IllegalStateException`

    - #### suspend

          public ResteasyAsynchronousResponse suspend(long time,
                                             TimeUnit unit)
                                               throws IllegalStateException

      Throws:
        `IllegalStateException`

    - #### getAsyncResponse

          public ResteasyAsynchronousResponse getAsyncResponse()

    - #### isSuspended

          public boolean isSuspended()

Copyright © 2014. All Rights Reserved.