public synchronized void handleResponse(Response<Object> res) { r = res; done = true; if (continuation != null) { continuation.resume(); } notifyAll(); } public boolean hasContinuation() {
protected void invokeComplete(final ServletContext context, final HttpServletRequest req, final HttpServletResponse resp, Message m) throws IOException { ContinuationProvider p = m.get(ContinuationProvider.class); if (p != null) { p.complete(); } }
public void onError(AsyncEvent event) throws IOException { if (callback != null) { callback.onError(event.getThrowable()); } } public void onStartAsync(AsyncEvent event) throws IOException {
params.add(handler); return ret; } else if (cp != null && cp.getContinuation() != null) { final Continuation c = cp.getContinuation(); c.suspend(0); JaxwsServerHandler handler = new JaxwsServerHandler(c); ex.put(JaxwsServerHandler.class, handler);
public synchronized void suspendContinuation() { initialSuspend = false; cont.suspend(AsyncResponse.NO_TIMEOUT); }
public void onComplete(AsyncEvent event) throws IOException { inMessage.getExchange().getInMessage() .remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE); if (callback != null) { final Exception ex = inMessage.getExchange().get(Exception.class); if (ex == null) { callback.onComplete(); } else { callback.onError(ex); } } isResumed = false; isPending = false; } public void onError(AsyncEvent event) throws IOException {
/** * Returns a transport-specific runtime exception * @return RuntimeException the transport-specific runtime exception, * can be null for asynchronous transports */ public RuntimeException getRuntimeException() { Throwable ex = getCause(); return ex instanceof RuntimeException ? (RuntimeException)ex : null; } }
@Override public boolean isSuspended() { if (cancelled || resumedByApplication) { return false; } return initialSuspend || cont.isPending(); }
public void reset() { cont.reset(); } }
resp.flushBuffer(); } catch (SuspendedInvocationException ex) { if (ex.getRuntimeException() != null) { throw ex.getRuntimeException();
public void reset() { isComplete = true; try { context.complete(); } catch (IllegalStateException ex) { // ignore } isPending = false; isResumed = false; isNew = false; isTimeout = false; obj = null; if (callback != null) { final Exception ex = inMessage.getExchange().get(Exception.class); Throwable cause = isCausedByIO(ex); if (cause != null && isClientDisconnected(cause)) { callback.onDisconnect(); } } }
public synchronized void handleResponse(Response<Object> res) { r = res; done = true; if (continuation != null) { continuation.resume(); } notifyAll(); } public boolean hasContinuation() {
/** * Returns a transport-specific runtime exception * @return RuntimeException the transport-specific runtime exception, * can be null for asynchronous transports */ public RuntimeException getRuntimeException() { Throwable ex = getCause(); return ex instanceof RuntimeException ? (RuntimeException)ex : null; } }
@Override public synchronized boolean isSuspended() { return cont.isPending(); }
public void reset() { cont.reset(); }
invokeComplete(context, req, resp, inMessage); } catch (SuspendedInvocationException ex) { if (ex.getRuntimeException() != null) { throw ex.getRuntimeException();
protected void invokeComplete(final ServletContext context, final HttpServletRequest req, final HttpServletResponse resp, Message m) throws IOException { ContinuationProvider p = m.get(ContinuationProvider.class); if (p != null) { p.complete(); } }
public void run() { try { continuation.resume(); } catch (Exception e) { e.printStackTrace(); } } }).start();
/** * Returns a transport-specific runtime exception * @return RuntimeException the transport-specific runtime exception, * can be null for asynchronous transports */ public RuntimeException getRuntimeException() { Throwable ex = getCause(); return ex instanceof RuntimeException ? (RuntimeException)ex : null; } }
/** * Returns a transport-specific runtime exception * @return RuntimeException the transport-specific runtime exception, * can be null for asynchronous transports */ public RuntimeException getRuntimeException() { Throwable ex = getCause(); return ex instanceof RuntimeException ? (RuntimeException)ex : null; } }