本文整理了Java中org.apache.cxf.Bus.getInFaultInterceptors()
方法的一些代码示例,展示了Bus.getInFaultInterceptors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bus.getInFaultInterceptors()
方法的具体详情如下:
包路径:org.apache.cxf.Bus
类名称:Bus
方法名:getInFaultInterceptors
暂无
代码示例来源:origin: org.apache.cxf/cxf-core
public List<Interceptor<? extends Message>> getInFaultInterceptors() {
if (bus != null) {
return bus.getInFaultInterceptors();
}
return super.getInFaultInterceptors();
}
代码示例来源:origin: apache/cxf
public List<Interceptor<? extends Message>> getInFaultInterceptors() {
if (bus != null) {
return bus.getInFaultInterceptors();
}
return super.getInFaultInterceptors();
}
代码示例来源:origin: org.apache.cxf/cxf-core
public void setInFaultInterceptors(List<Interceptor<? extends Message>> interceptors) {
if (bus != null) {
bus.getInFaultInterceptors().addAll(interceptors);
} else {
super.setInFaultInterceptors(interceptors);
}
}
代码示例来源:origin: apache/cxf
public void setInFaultInterceptors(List<Interceptor<? extends Message>> interceptors) {
if (bus != null) {
bus.getInFaultInterceptors().addAll(interceptors);
} else {
super.setInFaultInterceptors(interceptors);
}
}
代码示例来源:origin: apache/cxf
public synchronized void removeBusInterceptors() {
bus.getInInterceptors().remove(PolicyInInterceptor.INSTANCE);
bus.getOutInterceptors().remove(PolicyOutInterceptor.INSTANCE);
bus.getInFaultInterceptors().remove(ClientPolicyInFaultInterceptor.INSTANCE);
bus.getOutFaultInterceptors().remove(ServerPolicyOutFaultInterceptor.INSTANCE);
bus.getInFaultInterceptors().remove(PolicyVerificationInFaultInterceptor.INSTANCE);
addedBusInterceptors = false;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-policy
public synchronized void removeBusInterceptors() {
bus.getInInterceptors().remove(PolicyInInterceptor.INSTANCE);
bus.getOutInterceptors().remove(PolicyOutInterceptor.INSTANCE);
bus.getInFaultInterceptors().remove(ClientPolicyInFaultInterceptor.INSTANCE);
bus.getOutFaultInterceptors().remove(ServerPolicyOutFaultInterceptor.INSTANCE);
bus.getInFaultInterceptors().remove(PolicyVerificationInFaultInterceptor.INSTANCE);
addedBusInterceptors = false;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-ws-policy
public final synchronized void addBusInterceptors() {
if (null == bus || !enabled) {
return;
}
if (ignoreUnknownAssertions != null) {
AssertionBuilderRegistry abr = bus.getExtension(AssertionBuilderRegistry.class);
if (null != abr) {
abr.setIgnoreUnknownAssertions(ignoreUnknownAssertions);
}
}
bus.getInInterceptors().add(PolicyInInterceptor.INSTANCE);
bus.getOutInterceptors().add(PolicyOutInterceptor.INSTANCE);
bus.getInFaultInterceptors().add(ClientPolicyInFaultInterceptor.INSTANCE);
bus.getOutFaultInterceptors().add(ServerPolicyOutFaultInterceptor.INSTANCE);
bus.getInFaultInterceptors().add(PolicyVerificationInFaultInterceptor.INSTANCE);
addedBusInterceptors = true;
}
代码示例来源:origin: apache/cxf
public final synchronized void addBusInterceptors() {
if (null == bus || !enabled) {
return;
}
if (ignoreUnknownAssertions != null) {
AssertionBuilderRegistry abr = bus.getExtension(AssertionBuilderRegistry.class);
if (null != abr) {
abr.setIgnoreUnknownAssertions(ignoreUnknownAssertions);
}
}
bus.getInInterceptors().add(PolicyInInterceptor.INSTANCE);
bus.getOutInterceptors().add(PolicyOutInterceptor.INSTANCE);
bus.getInFaultInterceptors().add(ClientPolicyInFaultInterceptor.INSTANCE);
bus.getOutFaultInterceptors().add(ServerPolicyOutFaultInterceptor.INSTANCE);
bus.getInFaultInterceptors().add(PolicyVerificationInFaultInterceptor.INSTANCE);
addedBusInterceptors = true;
}
代码示例来源:origin: apache/cxf
protected ByteArrayOutputStream setupInLogging() {
PayloadLogEventSender sender = new PayloadLogEventSender();
LoggingInInterceptor in = new LoggingInInterceptor(sender);
this.bus.getInInterceptors().add(in);
this.bus.getInFaultInterceptors().add(in);
return sender.bos;
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-rest-server
public static void installRest(ServletContextHandler context, Object... providers) {
initSwagger();
BrooklynRestApp app = new BrooklynRestApp();
for (Object o : providers) {
app.singleton(o);
}
CXFNonSpringJaxrsServlet servlet = new CXFNonSpringJaxrsServlet(app);
servlet.setBus(BusFactory.newInstance().createBus());
servlet.getBus().getInInterceptors().add(new GZIPInInterceptor());
servlet.getBus().getInFaultInterceptors().add(new GZIPInInterceptor());
servlet.getBus().getOutInterceptors().add(new GZIPOutInterceptor());
final ServletHolder servletHolder = new ServletHolder(servlet);
context.addServlet(servletHolder, "/v1/*");
}
代码示例来源:origin: apache/cxf
protected void run() {
System.setProperty("temp.location", tmpDir);
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr0705.xml");
BusFactory.setDefaultBus(bus);
setBus(bus);
LoggingInInterceptor in = new LoggingInInterceptor();
bus.getInInterceptors().add(in);
bus.getInFaultInterceptors().add(in);
LoggingOutInterceptor out = new LoggingOutInterceptor();
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
GreeterImpl implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
ep = Endpoint.publish(address, implementor);
LOG.info("Published greeter endpoint.");
}
public void tearDown() {
代码示例来源:origin: apache/cxf
protected void run() {
System.setProperty("temp.location", tmpDir);
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-wsdl11.xml");
BusFactory.setDefaultBus(bus);
setBus(bus);
LoggingInInterceptor in = new LoggingInInterceptor();
bus.getInInterceptors().add(in);
bus.getInFaultInterceptors().add(in);
LoggingOutInterceptor out = new LoggingOutInterceptor();
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
GreeterImpl implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
ep = Endpoint.publish(address, implementor);
LOG.info("Published greeter endpoint.");
}
public void tearDown() {
代码示例来源:origin: apache/cxf
protected void run() {
System.setProperty("temp.location", tmpDir);
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-optional.xml");
BusFactory.setDefaultBus(bus);
setBus(bus);
LoggingInInterceptor in = new LoggingInInterceptor();
bus.getInInterceptors().add(in);
bus.getInFaultInterceptors().add(in);
LoggingOutInterceptor out = new LoggingOutInterceptor();
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
GreeterImpl implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
ep = Endpoint.publish(address, implementor);
LOG.info("Published greeter endpoint.");
}
public void tearDown() {
代码示例来源:origin: apache/cxf
protected void run() {
System.setProperty("temp.location", tmpDir);
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr.xml");
BusFactory.setDefaultBus(bus);
setBus(bus);
LoggingInInterceptor in = new LoggingInInterceptor();
bus.getInInterceptors().add(in);
bus.getInFaultInterceptors().add(in);
LoggingOutInterceptor out = new LoggingOutInterceptor();
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
GreeterImpl implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
ep = Endpoint.publish(address, implementor);
LOG.info("Published greeter endpoint.");
}
public void tearDown() {
代码示例来源:origin: apache/cxf
protected void run() {
System.setProperty("server.temp.location", tmpDir);
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-anon-server.xml");
setBus(bus);
BusFactory.setDefaultBus(bus);
LoggingInInterceptor in = new LoggingInInterceptor();
bus.getInInterceptors().add(in);
bus.getInFaultInterceptors().add(in);
LoggingOutInterceptor out = new LoggingOutInterceptor();
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
GreeterImpl implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
ep = Endpoint.publish(address, implementor);
LOG.info("Published greeter endpoint.");
}
public void tearDown() {
代码示例来源:origin: apache/cxf
@After
public void tearDown() throws Exception {
Interceptor<?>[] interceptors = {mapVerifier, headerVerifier };
removeInterceptors(staticBus.getInInterceptors(), interceptors);
removeInterceptors(staticBus.getOutInterceptors(), interceptors);
removeInterceptors(staticBus.getOutFaultInterceptors(), interceptors);
removeInterceptors(staticBus.getInFaultInterceptors(), interceptors);
if (greeter instanceof Closeable) {
((Closeable)greeter).close();
}
greeter = null;
mapVerifier = null;
headerVerifier = null;
verified = null;
messageIDs.clear();
}
代码示例来源:origin: apache/cxf
@Test
public void testUsingAddressing() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-wsdl11.xml");
BusFactory.setDefaultBus(bus);
LoggingInInterceptor in = new LoggingInInterceptor();
bus.getInInterceptors().add(in);
bus.getInFaultInterceptors().add(in);
LoggingOutInterceptor out = new LoggingOutInterceptor();
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
BasicGreeterService gs = new BasicGreeterService();
final Greeter greeter = gs.getGreeterPort();
updateAddressPort(greeter, PORT);
LOG.fine("Created greeter client.");
ConnectionHelper.setKeepAliveConnection(greeter, true);
assertEquals("CXF", greeter.greetMe("cxf"));
((Closeable)greeter).close();
}
}
代码示例来源:origin: apache/cxf
protected void addVerifiers() {
MAPVerifier mapVerifier = new MAPVerifier();
mapVerifier.verificationCache = this;
HeaderVerifier headerVerifier = new HeaderVerifier();
headerVerifier.verificationCache = this;
Interceptor<?>[] interceptors = {mapVerifier, headerVerifier};
addInterceptors(getBus().getInInterceptors(), interceptors);
addInterceptors(getBus().getInFaultInterceptors(), interceptors);
addInterceptors(getBus().getOutInterceptors(), interceptors);
addInterceptors(getBus().getOutFaultInterceptors(), interceptors);
}
代码示例来源:origin: org.apache.cxf/cxf-api
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) {
Endpoint e = ex.get(Endpoint.class);
Client c = ex.get(Client.class);
InterceptorProvider ip = ex.get(InterceptorProvider.class);
chain.add(getBus().getInFaultInterceptors());
if (c != null) {
chain.add(c.getInFaultInterceptors());
} else if (ip != null) {
chain.add(ip.getInFaultInterceptors());
}
chain.add(e.getService().getInFaultInterceptors());
chain.add(e.getInFaultInterceptors());
chain.add(e.getBinding().getInFaultInterceptors());
if (e.getService().getDataBinding() instanceof InterceptorProvider) {
chain.add(((InterceptorProvider)e.getService().getDataBinding()).getInFaultInterceptors());
}
addToChain(chain, ex.getInFaultMessage());
addToChain(chain, ex.getOutMessage());
}
private void addToChain(PhaseInterceptorChain chain, Message m) {
代码示例来源:origin: apache/cxf
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) {
Endpoint e = ex.getEndpoint();
Client c = ex.get(Client.class);
InterceptorProvider ip = ex.get(InterceptorProvider.class);
chain.add(getBus().getInFaultInterceptors());
if (c != null) {
chain.add(c.getInFaultInterceptors());
} else if (ip != null) {
chain.add(ip.getInFaultInterceptors());
}
chain.add(e.getService().getInFaultInterceptors());
chain.add(e.getInFaultInterceptors());
chain.add(e.getBinding().getInFaultInterceptors());
if (e.getService().getDataBinding() instanceof InterceptorProvider) {
chain.add(((InterceptorProvider)e.getService().getDataBinding()).getInFaultInterceptors());
}
addToChain(chain, ex.getInFaultMessage());
addToChain(chain, ex.getOutMessage());
}
private void addToChain(PhaseInterceptorChain chain, Message m) {
内容来源于网络,如有侵权,请联系作者删除!