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 {
outMessage.remove(HTTP_RESPONSE);
public <T> T remove(Class<T> key) { return message.remove(key); }
public Object remove(Object key) { return message.remove(key); }
public Object remove(Object key) { return message.remove(key); }
public <T> T remove(Class<T> key) { return message.remove(key); }
// in your send interceptor @Override public void handleMessage(Message message) { Long startTime = message.remove("my.timing.start"); if (startTime != null) { long executionTime = System.currentTimeMillis() - startTime; System.out.println("execution time was ~" + executionTime + " ms"); } }
public static void updatePath(Message m, String path) { String baseAddress = getBaseAddress(m); boolean pathSlash = path.startsWith("/"); boolean baseSlash = baseAddress.endsWith("/"); if (pathSlash && baseSlash) { path = path.substring(1); } else if (!pathSlash && !baseSlash) { path = "/" + path; } m.put(Message.REQUEST_URI, baseAddress + path); m.remove(REQUEST_PATH_TO_MATCH); m.remove(REQUEST_PATH_TO_MATCH_SLASH); }
public static void updatePath(Message m, String path) { String baseAddress = getBaseAddress(m); boolean pathSlash = path.startsWith("/"); boolean baseSlash = baseAddress.endsWith("/"); if (pathSlash && baseSlash) { path = path.substring(1); } else if (!pathSlash && !baseSlash) { path = "/" + path; } m.put(Message.REQUEST_URI, baseAddress + path); m.remove(REQUEST_PATH_TO_MATCH); m.remove(REQUEST_PATH_TO_MATCH_SLASH); }
public void onComplete(org.eclipse.jetty.continuation.Continuation cont) { getMessage().remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE); isPending = false; pendingTimeout = 0; isResumed = false; if (callback != null) { callback.onComplete(); } }
public void onComplete(org.eclipse.jetty.continuation.Continuation cont) { getMessage().remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE); isPending = false; pendingTimeout = 0; isResumed = false; if (callback != null) { callback.onComplete(); } }
public void onComplete(org.eclipse.jetty.continuation.Continuation cont) { getMessage().remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE); isPending = false; pendingTimeout = 0; //REVISIT: isResumed = false; if (callback != null) { callback.onComplete(); } }
@Override protected void done() { super.done(); if (contextSwitched.get()) { PhaseInterceptorChain.setCurrentMessage(chain, null); message.remove(Message.THREAD_CONTEXT_SWITCHED); } chain.releaseChain(); }
@Override protected void done() { super.done(); if (contextSwitched.get()) { PhaseInterceptorChain.setCurrentMessage(chain, null); message.remove(Message.THREAD_CONTEXT_SWITCHED); } chain.releaseChain(); }
public void onComplete(AsyncEvent event) throws IOException { inMessage.getExchange().getInMessage() .remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE); if (callback != null) { callback.onComplete(); } } public void onError(AsyncEvent event) throws IOException {
private void doSetEntity(Object entity) { Object actualEntity = InjectionUtils.getEntity(entity); m.setContent(List.class, actualEntity == null ? new MessageContentsList() : new MessageContentsList(actualEntity)); Type type = null; if (entity != null) { if (GenericEntity.class.isAssignableFrom(entity.getClass())) { type = ((GenericEntity<?>)entity).getType(); } else { type = entity.getClass(); } m.put(Type.class, type); m.remove("org.apache.cxf.empty.request"); } }
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 {