|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.internal.JerseyRequestTimeoutHandler
public class JerseyRequestTimeoutHandler
Common ContainerResponseWriter.suspend(long, TimeUnit, ContainerResponseWriter.TimeoutHandler)
and ContainerResponseWriter.setSuspendTimeout(long, TimeUnit) handler that can be used in
ContainerResponseWriter implementations instead of the underlying infrastructure.
| Constructor Summary | |
|---|---|
JerseyRequestTimeoutHandler(ContainerResponseWriter containerResponseWriter,
ScheduledExecutorService timeoutTaskExecutor)
Create request timeout handler for the giver response writer. |
|
| Method Summary | |
|---|---|
void |
setSuspendTimeout(long timeOut,
TimeUnit unit)
Set the suspend timeout. |
boolean |
suspend(long timeOut,
TimeUnit unit,
ContainerResponseWriter.TimeoutHandler handler)
Suspend the request/response processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JerseyRequestTimeoutHandler(ContainerResponseWriter containerResponseWriter,
ScheduledExecutorService timeoutTaskExecutor)
response writer.
containerResponseWriter - response writer to create request timeout handler for.timeoutTaskExecutor - Jersey runtime executor used for background execution of timeout
handling tasks.| Method Detail |
|---|
public boolean suspend(long timeOut,
TimeUnit unit,
ContainerResponseWriter.TimeoutHandler handler)
timeOut - time-out value. Value less or equal to 0, indicates that
the processing is suspended indefinitely.unit - time-out time unit.handler - time-out handler to process a time-out event if it occurs.
true if the suspend operation completed successfully, false otherwise.ContainerResponseWriter.suspend(long, TimeUnit, ContainerResponseWriter.TimeoutHandler)
public void setSuspendTimeout(long timeOut,
TimeUnit unit)
throws IllegalStateException
timeOut - time-out value. Value less or equal to 0, indicates that
the processing is suspended indefinitely.unit - time-out time unit.
IllegalStateException - in case the response writer has not been suspended yet.ContainerResponseWriter.setSuspendTimeout(long, TimeUnit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||