本文整理了Java中javax.xml.ws.handler.Handler
类的一些代码示例,展示了Handler
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handler
类的具体详情如下:
包路径:javax.xml.ws.handler.Handler
类名称:Handler
[英]The Handler interface is the base interface for JAX-WS handlers.
[中]处理程序接口是JAX-WS处理程序的基本接口。
代码示例来源:origin: org.jboss.ws/jbossws-common
@Override
public boolean handleMessage(T context)
{
return delegate.handleMessage(context);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
private void invokeReversedClose() {
int index = invokedHandlers.size() - 1;
while (index >= 0) {
Handler<?> handler = invokedHandlers.get(index);
if (handler instanceof LogicalHandler) {
handler.close(logicalMessageContext);
} else {
handler.close(protocolMessageContext);
}
invokedHandlers.remove(index);
index--;
}
closed = true;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
@SuppressWarnings("unchecked")
private boolean invokeHandleFault(List<? extends Handler<?>> handlerChain, MessageContext ctx) {
boolean continueProcessing = true;
try {
for (Handler<?> h : handlerChain) {
if (invokeThisHandler(h)) {
closeHandlers.add(h);
markHandlerInvoked(h);
Handler<MessageContext> lh = (Handler<MessageContext>)h;
continueProcessing = lh.handleFault(ctx);
}
if (!continueProcessing) {
break;
}
}
} catch (RuntimeException e) {
LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
continueProcessing = false;
throw e;
}
return continueProcessing;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
markHandlerInvoked(h);
Handler<MessageContext> lh = (Handler<MessageContext>)h;
continueProcessing = lh.handleMessage(ctx);
代码示例来源:origin: org.jboss.ws/jbossws-common
@Override
public void close(MessageContext context)
{
delegate.close(context);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
@SuppressWarnings("unchecked")
private boolean invokeReversedHandleFault(MessageContext ctx) {
boolean continueProcessing = true;
try {
int index = invokedHandlers.size() - 2;
while (index >= 0 && continueProcessing) {
Handler<? extends MessageContext> h = invokedHandlers.get(index);
if (h instanceof LogicalHandler) {
LogicalHandler<LogicalMessageContext> lh = (LogicalHandler<LogicalMessageContext>)h;
continueProcessing = lh.handleFault(logicalMessageContext);
} else {
Handler<MessageContext> ph = (Handler<MessageContext>)h;
continueProcessing = ph.handleFault(protocolMessageContext);
}
if (!continueProcessing) {
invokeReversedClose();
break;
}
index--;
}
} catch (RuntimeException e) {
LOG.log(Level.WARNING, "HANDLER_RAISED_RUNTIME_EXCEPTION", e);
invokeReversedClose();
continueProcessing = false;
closed = true;
throw e;
}
invokeReversedClose();
return continueProcessing;
}
代码示例来源:origin: org.codehaus.xfire/xfire-jaxws
protected void invokeHandler(SOAPMessageContext soapContext, Handler handler)
{
if (handler instanceof LogicalHandler)
{
LogicalHandler lh = (LogicalHandler) handler;
}
else if (handler instanceof SOAPHandler)
{
SOAPHandler sh = (SOAPHandler) handler;
sh.handleMessage(soapContext);
}
else
{
handler.handleMessage(soapContext);
}
}
}
代码示例来源:origin: apache/cxf
private void invokeReversedClose() {
int index = invokedHandlers.size() - 1;
while (index >= 0) {
Handler<?> handler = invokedHandlers.get(index);
if (handler instanceof LogicalHandler) {
handler.close(logicalMessageContext);
} else {
handler.close(protocolMessageContext);
}
invokedHandlers.remove(index);
index--;
}
closed = true;
}
代码示例来源:origin: org.jboss.ws/jbossws-common
@Override
public boolean handleFault(T context)
{
return delegate.handleFault(context);
}
代码示例来源:origin: javaee/metro-jax-ws
private boolean callHandleMessageReverse(C context, int start, int end) {
if (handlers.isEmpty() ||
start == -1 ||
start == handlers.size()) {
return false;
}
int i = start;
if (start > end) {
while (i >= end) {
if (!handlers.get(i).handleMessage(context)) {
// Set handleFalse so that cousinTube is aware of false processing
setHandleFalseProperty();
return false;
}
i--;
}
} else {
while (i <= end) {
if (!handlers.get(i).handleMessage(context)) {
// Set handleFalse so that cousinTube is aware of false processing
setHandleFalseProperty();
return false;
}
i++;
}
}
return true;
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
private <T extends Handler> void invokeClose(List<T> handlers, MessageContext context) {
handlers = reverseHandlerChain(handlers);
for (Handler h : handlers) {
if (closeHandlers.contains(h)) {
h.close(context);
}
}
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
try {
while (i >= end) {
if (!handlers.get(i).handleFault(context)) {
return false;
try {
while (i <= end) {
if (!handlers.get(i).handleFault(context)) {
return false;
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
private boolean callHandleMessageReverse(C context, int start, int end) {
if (handlers.isEmpty() ||
start == -1 ||
start == handlers.size()) {
return false;
}
int i = start;
if (start > end) {
while (i >= end) {
if (!handlers.get(i).handleMessage(context)) {
// Set handleFalse so that cousinTube is aware of false processing
setHandleFalseProperty();
return false;
}
i--;
}
} else {
while (i <= end) {
if (!handlers.get(i).handleMessage(context)) {
// Set handleFalse so that cousinTube is aware of false processing
setHandleFalseProperty();
return false;
}
i++;
}
}
return true;
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
for (int i = start; i >= end; i--) {
try {
handlers.get(i).close(context);
} catch (RuntimeException re) {
logger.log(Level.INFO,
for (int i = start; i <= end; i++) {
try {
handlers.get(i).close(context);
} catch (RuntimeException re) {
logger.log(Level.INFO,
代码示例来源:origin: com.sun.xml.ws/rt
try {
while (i >= end) {
if (!handlers.get(i).handleFault(context)) {
return false;
try {
while (i <= end) {
if (!handlers.get(i).handleFault(context)) {
return false;
代码示例来源:origin: com.sun.xml.ws/rt
private boolean callHandleMessageReverse(C context, int start, int end) {
if (handlers.isEmpty() ||
start == -1 ||
start == handlers.size()) {
return false;
}
int i = start;
if (start > end) {
while (i >= end) {
if (!handlers.get(i).handleMessage(context)) {
// Set handleFalse so that cousinTube is aware of false processing
setHandleFalseProperty();
return false;
}
i--;
}
} else {
while (i <= end) {
if (!handlers.get(i).handleMessage(context)) {
// Set handleFalse so that cousinTube is aware of false processing
setHandleFalseProperty();
return false;
}
i++;
}
}
return true;
}
代码示例来源:origin: com.sun.xml.ws/rt
for (int i = start; i >= end; i--) {
try {
handlers.get(i).close(context);
} catch (RuntimeException re) {
logger.log(Level.INFO,
for (int i = start; i <= end; i++) {
try {
handlers.get(i).close(context);
} catch (RuntimeException re) {
logger.log(Level.INFO,
代码示例来源:origin: javaee/metro-jax-ws
try {
while (i >= end) {
if (!handlers.get(i).handleFault(context)) {
return false;
try {
while (i <= end) {
if (!handlers.get(i).handleFault(context)) {
return false;
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
if (start > end) {
while (i >= end) {
if (!handlers.get(i).handleMessage(context)) {
setIndex(i);
return false;
if (!handlers.get(i).handleMessage(context)) {
setIndex(i);
return false;
代码示例来源:origin: javaee/metro-jax-ws
for (int i = start; i >= end; i--) {
try {
handlers.get(i).close(context);
} catch (RuntimeException re) {
logger.log(Level.INFO,
for (int i = start; i <= end; i++) {
try {
handlers.get(i).close(context);
} catch (RuntimeException re) {
logger.log(Level.INFO,
内容来源于网络,如有侵权,请联系作者删除!