本文整理了Java中org.apache.cxf.message.Message.containsKey()
方法的一些代码示例,展示了Message.containsKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.containsKey()
方法的具体详情如下:
包路径:org.apache.cxf.message.Message
类名称:Message
方法名:containsKey
暂无
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
protected void updateWebServiceContext(Exchange exchange, MessageContext ctx) {
// Guard against wrong type associated with header list.
// Need to copy header only if the message is going out.
if (ctx.containsKey(Header.HEADER_LIST)
&& ctx.get(Header.HEADER_LIST) instanceof List<?>) {
List<?> list = (List<?>) ctx.get(Header.HEADER_LIST);
if (list != null && !list.isEmpty()) {
SoapMessage sm = (SoapMessage) createResponseMessage(exchange);
if (sm != null) {
Iterator<?> iter = list.iterator();
while (iter.hasNext()) {
sm.getHeaders().add((Header) iter.next());
}
}
}
}
if (exchange.getOutMessage() != null) {
Message out = exchange.getOutMessage();
if (out.containsKey(Message.PROTOCOL_HEADERS)) {
Map<String, List<String>> heads = CastUtils
.cast((Map<?, ?>)exchange.getOutMessage().get(Message.PROTOCOL_HEADERS));
if (heads.containsKey("Content-Type")) {
List<String> ct = heads.get("Content-Type");
exchange.getOutMessage().put(Message.CONTENT_TYPE, ct.get(0));
heads.remove("Content-Type");
}
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
public boolean containsKey(Object key) {
return message.containsKey(key);
}
代码示例来源:origin: apache/cxf
public boolean containsKey(Object key) {
return message.containsKey(key);
}
代码示例来源:origin: apache/cxf
public static boolean isRequestor(Message message) {
return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
}
代码示例来源:origin: org.apache.cxf/cxf-core
protected boolean isRequestor(Message message) {
return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
}
代码示例来源:origin: apache/cxf
protected boolean isRequestor(Message message) {
return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
}
代码示例来源:origin: org.apache.servicemix/servicemix-cxf-se
protected boolean isRequestor(org.apache.cxf.message.Message message) {
return Boolean.TRUE.equals(message.containsKey(
org.apache.cxf.message.Message.REQUESTOR_ROLE));
}
代码示例来源:origin: org.apache.cxf/cxf-rt-features-logging
private static String safeGet(Message message, String key) {
if (message == null || !message.containsKey(key)) {
return null;
}
Object value = message.get(key);
return (value instanceof String) ? value.toString() : null;
}
代码示例来源:origin: apache/cxf
private static String safeGet(Message message, String key) {
if (!message.containsKey(key)) {
return null;
}
Object value = message.get(key);
return (value instanceof String) ? value.toString() : null;
}
代码示例来源:origin: apache/cxf
String safeGet(String key) {
if (!message.containsKey(key)) {
return null;
}
Object value = message.get(key);
return (value instanceof String) ? value.toString() : null;
}
代码示例来源:origin: apache/cxf
private static String safeGet(Message message, String key) {
if (message == null || !message.containsKey(key)) {
return null;
}
Object value = message.get(key);
return (value instanceof String) ? value.toString() : null;
}
代码示例来源:origin: org.apache.cxf/cxf-integration-tracing-brave
String safeGet(String key) {
if (!message.containsKey(key)) {
return null;
}
Object value = message.get(key);
return (value instanceof String) ? value.toString() : null;
}
代码示例来源:origin: org.apache.servicemix/servicemix-cxf-se
public Message createMessage(Message m) {
if (!m.containsKey(Message.CONTENT_TYPE)) {
m.put(Message.CONTENT_TYPE, "text/xml");
}
return new JBIMessage(m);
}
代码示例来源:origin: org.apache.servicemix.cxf/org.apache.servicemix.cxf.binding.nmr
public Message createMessage(Message m) {
if (!m.containsKey(Message.CONTENT_TYPE)) {
m.put(Message.CONTENT_TYPE, "text/xml");
}
return new NMRMessage(m);
}
代码示例来源:origin: apache/cxf
public static PropertyHolder getPropertyHolder(Message m) {
return m.containsKey("HTTP.REQUEST") ? new ServletRequestPropertyHolder(m) : new MessagePropertyHolder(m);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http-jetty
protected void setupContinuation(Message inMessage,
final HttpServletRequest req,
final HttpServletResponse resp) {
if (engine != null && engine.getContinuationsEnabled()) {
super.setupContinuation(inMessage, req, resp);
if (!inMessage.containsKey(ContinuationProvider.class.getName())) {
inMessage.put(ContinuationProvider.class.getName(),
new JettyContinuationProvider(req, resp, inMessage));
}
}
}
代码示例来源:origin: apache/cxf
protected void setupContinuation(Message inMessage,
final HttpServletRequest req,
final HttpServletResponse resp) {
if (engine != null && engine.getContinuationsEnabled()) {
super.setupContinuation(inMessage, req, resp);
if (!inMessage.containsKey(ContinuationProvider.class.getName())) {
inMessage.put(ContinuationProvider.class.getName(),
new JettyContinuationProvider(req, resp, inMessage));
}
}
}
代码示例来源:origin: apache/cxf
public org.apache.cxf.message.Message createMessage(org.apache.cxf.message.Message m) {
if (!m.containsKey(org.apache.cxf.message.Message.CONTENT_TYPE)) {
String ct = null;
// Should this be done in ServiceInvokerInterceptor to support a case where the
// response content type is detected early on the inbound chain for all the bindings ?
Exchange exchange = m.getExchange();
if (exchange != null) {
ct = (String)exchange.get(org.apache.cxf.message.Message.CONTENT_TYPE);
}
m.put(org.apache.cxf.message.Message.CONTENT_TYPE, ct);
}
return m;
}
}
代码示例来源:origin: apache/cxf
@Override
public ThrottleResponse getThrottleResponse(String phase, Message m) {
if (m.containsKey(THROTTLED_KEY)) {
return null;
}
m.getExchange().put(ThrottlingCounter.class, counter);
if (counter.incrementAndGet() >= threshold) {
m.put(THROTTLED_KEY, true);
return this;
}
return null;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-features-throttling
@Override
public ThrottleResponse getThrottleResponse(String phase, Message m) {
if (m.containsKey(THROTTLED_KEY)) {
return null;
}
m.getExchange().put(ThrottlingCounter.class, counter);
if (counter.incrementAndGet() >= threshold) {
m.put(THROTTLED_KEY, true);
return this;
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!