本文整理了Java中org.apache.cxf.message.Message.remove()
方法的一些代码示例,展示了Message.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.remove()
方法的具体详情如下:
包路径:org.apache.cxf.message.Message
类名称: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
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 {
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
inMessage.remove(AbstractHTTPDestination.HTTP_REQUEST);
inMessage.remove(AbstractHTTPDestination.HTTP_RESPONSE);
inMessage.remove(Message.ASYNC_POST_RESPONSE_DISPATCH);
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
outMessage.remove(HTTP_RESPONSE);
代码示例来源:origin: apache/cxf
public <T> T remove(Class<T> key) {
return message.remove(key);
}
代码示例来源:origin: org.apache.cxf/cxf-core
public Object remove(Object key) {
return message.remove(key);
}
代码示例来源:origin: apache/cxf
public Object remove(Object key) {
return message.remove(key);
}
代码示例来源:origin: org.apache.cxf/cxf-core
public <T> T remove(Class<T> key) {
return message.remove(key);
}
代码示例来源:origin: apache/cxf
public static void resetRequestURI(Message m, String requestURI) {
m.remove(REQUEST_PATH_TO_MATCH_SLASH);
m.remove(REQUEST_PATH_TO_MATCH);
m.put(Message.REQUEST_URI, requestURI);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
public static void resetRequestURI(Message m, String requestURI) {
m.remove(REQUEST_PATH_TO_MATCH_SLASH);
m.remove(REQUEST_PATH_TO_MATCH);
m.put(Message.REQUEST_URI, requestURI);
}
代码示例来源:origin: stackoverflow.com
// 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");
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
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);
}
代码示例来源:origin: apache/cxf
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);
}
代码示例来源:origin: apache/cxf
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();
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http-jetty
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();
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
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();
}
}
代码示例来源:origin: apache/cxf
@Override
protected void done() {
super.done();
if (contextSwitched.get()) {
PhaseInterceptorChain.setCurrentMessage(chain, null);
message.remove(Message.THREAD_CONTEXT_SWITCHED);
}
chain.releaseChain();
}
代码示例来源:origin: org.apache.cxf/cxf-core
@Override
protected void done() {
super.done();
if (contextSwitched.get()) {
PhaseInterceptorChain.setCurrentMessage(chain, null);
message.remove(Message.THREAD_CONTEXT_SWITCHED);
}
chain.releaseChain();
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
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 {
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-client
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");
}
}
代码示例来源:origin: apache/cxf
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 {
内容来源于网络,如有侵权,请联系作者删除!