org.apache.cxf.message.Message.remove()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(241)

本文整理了Java中org.apache.cxf.message.Message.remove()方法的一些代码示例,展示了Message.remove()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.remove()方法的具体详情如下:
包路径:org.apache.cxf.message.Message
类名称:Message
方法名:remove

Message.remove介绍

[英]Removes a content from a message. If some contents are completely consumed, removing them is a good idea
[中]从邮件中删除内容。如果一些内容被完全消耗,移除它们是一个好主意

代码示例

代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http

  1. public void onComplete(AsyncEvent event) throws IOException {
  2. inMessage.getExchange().getInMessage()
  3. .remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE);
  4. if (callback != null) {
  5. final Exception ex = inMessage.getExchange().get(Exception.class);
  6. if (ex == null) {
  7. callback.onComplete();
  8. } else {
  9. callback.onError(ex);
  10. }
  11. }
  12. isResumed = false;
  13. isPending = false;
  14. }
  15. public void onError(AsyncEvent event) throws IOException {

代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http

  1. inMessage.remove(AbstractHTTPDestination.HTTP_REQUEST);
  2. inMessage.remove(AbstractHTTPDestination.HTTP_RESPONSE);
  3. inMessage.remove(Message.ASYNC_POST_RESPONSE_DISPATCH);

代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http

  1. outMessage.remove(HTTP_RESPONSE);

代码示例来源:origin: apache/cxf

  1. public <T> T remove(Class<T> key) {
  2. return message.remove(key);
  3. }

代码示例来源:origin: org.apache.cxf/cxf-core

  1. public Object remove(Object key) {
  2. return message.remove(key);
  3. }

代码示例来源:origin: apache/cxf

  1. public Object remove(Object key) {
  2. return message.remove(key);
  3. }

代码示例来源:origin: org.apache.cxf/cxf-core

  1. public <T> T remove(Class<T> key) {
  2. return message.remove(key);
  3. }

代码示例来源:origin: apache/cxf

  1. public static void resetRequestURI(Message m, String requestURI) {
  2. m.remove(REQUEST_PATH_TO_MATCH_SLASH);
  3. m.remove(REQUEST_PATH_TO_MATCH);
  4. m.put(Message.REQUEST_URI, requestURI);
  5. }

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

  1. public static void resetRequestURI(Message m, String requestURI) {
  2. m.remove(REQUEST_PATH_TO_MATCH_SLASH);
  3. m.remove(REQUEST_PATH_TO_MATCH);
  4. m.put(Message.REQUEST_URI, requestURI);
  5. }

代码示例来源:origin: stackoverflow.com

  1. // in your send interceptor
  2. @Override
  3. public void handleMessage(Message message) {
  4. Long startTime = message.remove("my.timing.start");
  5. if (startTime != null) {
  6. long executionTime = System.currentTimeMillis() - startTime;
  7. System.out.println("execution time was ~" + executionTime + " ms");
  8. }
  9. }

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

  1. public static void updatePath(Message m, String path) {
  2. String baseAddress = getBaseAddress(m);
  3. boolean pathSlash = path.startsWith("/");
  4. boolean baseSlash = baseAddress.endsWith("/");
  5. if (pathSlash && baseSlash) {
  6. path = path.substring(1);
  7. } else if (!pathSlash && !baseSlash) {
  8. path = "/" + path;
  9. }
  10. m.put(Message.REQUEST_URI, baseAddress + path);
  11. m.remove(REQUEST_PATH_TO_MATCH);
  12. m.remove(REQUEST_PATH_TO_MATCH_SLASH);
  13. }

代码示例来源:origin: apache/cxf

  1. public static void updatePath(Message m, String path) {
  2. String baseAddress = getBaseAddress(m);
  3. boolean pathSlash = path.startsWith("/");
  4. boolean baseSlash = baseAddress.endsWith("/");
  5. if (pathSlash && baseSlash) {
  6. path = path.substring(1);
  7. } else if (!pathSlash && !baseSlash) {
  8. path = "/" + path;
  9. }
  10. m.put(Message.REQUEST_URI, baseAddress + path);
  11. m.remove(REQUEST_PATH_TO_MATCH);
  12. m.remove(REQUEST_PATH_TO_MATCH_SLASH);
  13. }

代码示例来源:origin: apache/cxf

  1. public void onComplete(org.eclipse.jetty.continuation.Continuation cont) {
  2. getMessage().remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE);
  3. isPending = false;
  4. pendingTimeout = 0;
  5. isResumed = false;
  6. if (callback != null) {
  7. callback.onComplete();
  8. }
  9. }

代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http-jetty

  1. public void onComplete(org.eclipse.jetty.continuation.Continuation cont) {
  2. getMessage().remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE);
  3. isPending = false;
  4. pendingTimeout = 0;
  5. isResumed = false;
  6. if (callback != null) {
  7. callback.onComplete();
  8. }
  9. }

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

  1. public void onComplete(org.eclipse.jetty.continuation.Continuation cont) {
  2. getMessage().remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE);
  3. isPending = false;
  4. pendingTimeout = 0;
  5. //REVISIT: isResumed = false;
  6. if (callback != null) {
  7. callback.onComplete();
  8. }
  9. }

代码示例来源:origin: apache/cxf

  1. @Override
  2. protected void done() {
  3. super.done();
  4. if (contextSwitched.get()) {
  5. PhaseInterceptorChain.setCurrentMessage(chain, null);
  6. message.remove(Message.THREAD_CONTEXT_SWITCHED);
  7. }
  8. chain.releaseChain();
  9. }

代码示例来源:origin: org.apache.cxf/cxf-core

  1. @Override
  2. protected void done() {
  3. super.done();
  4. if (contextSwitched.get()) {
  5. PhaseInterceptorChain.setCurrentMessage(chain, null);
  6. message.remove(Message.THREAD_CONTEXT_SWITCHED);
  7. }
  8. chain.releaseChain();
  9. }

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

  1. public void onComplete(AsyncEvent event) throws IOException {
  2. inMessage.getExchange().getInMessage()
  3. .remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE);
  4. if (callback != null) {
  5. callback.onComplete();
  6. }
  7. }
  8. public void onError(AsyncEvent event) throws IOException {

代码示例来源:origin: org.apache.cxf/cxf-rt-rs-client

  1. private void doSetEntity(Object entity) {
  2. Object actualEntity = InjectionUtils.getEntity(entity);
  3. m.setContent(List.class, actualEntity == null ? new MessageContentsList()
  4. : new MessageContentsList(actualEntity));
  5. Type type = null;
  6. if (entity != null) {
  7. if (GenericEntity.class.isAssignableFrom(entity.getClass())) {
  8. type = ((GenericEntity<?>)entity).getType();
  9. } else {
  10. type = entity.getClass();
  11. }
  12. m.put(Type.class, type);
  13. m.remove("org.apache.cxf.empty.request");
  14. }
  15. }

代码示例来源:origin: apache/cxf

  1. public void onComplete(AsyncEvent event) throws IOException {
  2. inMessage.getExchange().getInMessage()
  3. .remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE);
  4. if (callback != null) {
  5. final Exception ex = inMessage.getExchange().get(Exception.class);
  6. if (ex == null) {
  7. callback.onComplete();
  8. } else {
  9. callback.onError(ex);
  10. }
  11. }
  12. isResumed = false;
  13. isPending = false;
  14. }
  15. public void onError(AsyncEvent event) throws IOException {

相关文章