本文整理了Java中org.apache.cxf.Bus.getOutInterceptors()
方法的一些代码示例,展示了Bus.getOutInterceptors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bus.getOutInterceptors()
方法的具体详情如下:
包路径:org.apache.cxf.Bus
类名称:Bus
方法名:getOutInterceptors
暂无
代码示例来源:origin: apache/cxf
public List<Interceptor<? extends Message>> getOutInterceptors() {
if (bus != null) {
return bus.getOutInterceptors();
}
return super.getOutInterceptors();
}
代码示例来源:origin: apache/cxf
public void setOutInterceptors(List<Interceptor<? extends Message>> interceptors) {
if (bus != null) {
bus.getOutInterceptors().addAll(interceptors);
} else {
super.setOutInterceptors(interceptors);
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
public List<Interceptor<? extends Message>> getOutInterceptors() {
if (bus != null) {
return bus.getOutInterceptors();
}
return super.getOutInterceptors();
}
代码示例来源:origin: apache/cxf
void registerInterceptorsToBus() {
ResponseTimeMessageInInterceptor in = new ResponseTimeMessageInInterceptor();
ResponseTimeMessageInvokerInterceptor invoker = new ResponseTimeMessageInvokerInterceptor();
ResponseTimeMessageOutInterceptor out = new ResponseTimeMessageOutInterceptor();
bus.getInInterceptors().add(in);
bus.getInInterceptors().add(invoker);
bus.getOutInterceptors().add(out);
bus.getOutFaultInterceptors().add(out);
bus.setExtension(this, CounterRepository.class);
//create CounterRepositroyMoniter to writer the counter log
//if the service is stopped or removed, the counters should remove itself
}
代码示例来源:origin: apache/cxf
protected ByteArrayOutputStream setupOutLogging() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(bos, true);
LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
this.bus.getOutInterceptors().add(out);
return bos;
}
代码示例来源:origin: apache/cxf
private ByteArrayOutputStream setupOutLogging() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(bos, true);
LoggingOutInterceptor out = new LoggingOutInterceptor(new PrintWriterEventSender(writer));
this.bus.getOutInterceptors().add(out);
return bos;
}
代码示例来源:origin: apache/cxf
protected ByteArrayOutputStream setupOutLogging() {
PayloadLogEventSender sender = new PayloadLogEventSender();
LoggingOutInterceptor out = new LoggingOutInterceptor(sender);
this.bus.getOutInterceptors().add(out);
this.bus.getOutFaultInterceptors().add(out);
return sender.bos;
}
代码示例来源:origin: apache/cxf
public void setUpBus(String port) throws Exception {
SpringBusFactory bf = new SpringBusFactory();
bus = bf.createBus("org/apache/cxf/systest/ws/policy/rmwsdl.xml");
BusFactory.setDefaultBus(bus);
outRecorder = new OutMessageRecorder();
bus.getOutInterceptors().add(outRecorder);
inRecorder = new InMessageRecorder();
bus.getInInterceptors().add(inRecorder);
}
}
代码示例来源:origin: apache/cxf
@org.junit.Before
public void setUp() throws Exception {
createBus();
getBus().getOutInterceptors().add(new LoggingOutInterceptor());
getBus().getInInterceptors().add(new LoggingInInterceptor());
}
代码示例来源:origin: apache/cxf
protected void run() {
String configurationFile = "undertowBasicAuthServer.xml";
URL configure =
UndertowBasicAuthServer.class.getResource(configurationFile);
Bus bus = new SpringBusFactory().createBus(configure, true);
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
BusFactory.setDefaultBus(bus);
setBus(bus);
GreeterImpl implementor = new GreeterImpl();
ep = Endpoint.publish(ADDRESS, implementor);
}
代码示例来源:origin: apache/cxf
protected void run() {
String configurationFile = "jettyBasicAuthServer.xml";
URL configure =
JettyBasicAuthServer.class.getResource(configurationFile);
Bus bus = new SpringBusFactory().createBus(configure, true);
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
BusFactory.setDefaultBus(bus);
setBus(bus);
GreeterImpl implementor = new GreeterImpl();
ep = Endpoint.publish(ADDRESS, implementor);
}
代码示例来源:origin: apache/cxf
protected void run() {
String configurationFile = "jettyDigestServer.xml";
URL configure =
JettyBasicAuthServer.class.getResource(configurationFile);
Bus bus = new SpringBusFactory().createBus(configure, true);
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
BusFactory.setDefaultBus(bus);
setBus(bus);
GreeterImpl implementor = new GreeterImpl();
ep = Endpoint.publish(ADDRESS, implementor);
}
代码示例来源:origin: apache/cxf
@org.junit.Before
public void setUp() {
BusFactory.setThreadDefaultBus(getStaticBus());
BusFactory.getThreadDefaultBus().getOutInterceptors().add(new LoggingOutInterceptor());
BusFactory.getThreadDefaultBus().getInInterceptors().add(new LoggingInInterceptor());
BusFactory.getThreadDefaultBus().getInInterceptors().add(new MalformedResponseInterceptor());
}
代码示例来源:origin: apache/cxf
@org.junit.Test
public void testGetWSDL() throws Exception {
BusFactory bf = BusFactory.newInstance();
Bus bus = bf.createBus();
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
factory.createClient(ADDRESS + "?wsdl");
}
代码示例来源:origin: apache/cxf
@org.junit.Test
public void testGetWSDL() throws Exception {
BusFactory bf = BusFactory.newInstance();
Bus bus = bf.createBus();
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
factory.createClient(ADDRESS + "?wsdl");
}
代码示例来源:origin: apache/cxf
@org.junit.Test
public void testGetWSDL() throws Exception {
BusFactory bf = BusFactory.newInstance();
Bus bus = bf.createBus();
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
factory.createClient(ADDRESS + "?wsdl");
}
代码示例来源:origin: apache/cxf
@Test
public void testGetWSDL() throws Exception {
BusFactory bf = BusFactory.newInstance();
Bus bus = bf.createBus();
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
factory.createClient(ADDRESS + "?wsdl");
}
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-client
protected static PhaseInterceptorChain setupOutInterceptorChain(ClientConfiguration cfg) {
PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class);
List<Interceptor<? extends Message>> i1 = cfg.getBus().getOutInterceptors();
List<Interceptor<? extends Message>> i2 = cfg.getOutInterceptors();
List<Interceptor<? extends Message>> i3 = cfg.getConduitSelector().getEndpoint().getOutInterceptors();
PhaseInterceptorChain chain = new PhaseChainCache().get(pm.getOutPhases(), i1, i2, i3);
chain.add(new ClientRequestFilterInterceptor());
return chain;
}
代码示例来源:origin: apache/cxf
protected static PhaseInterceptorChain setupOutInterceptorChain(ClientConfiguration cfg) {
PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class);
List<Interceptor<? extends Message>> i1 = cfg.getBus().getOutInterceptors();
List<Interceptor<? extends Message>> i2 = cfg.getOutInterceptors();
List<Interceptor<? extends Message>> i3 = cfg.getConduitSelector().getEndpoint().getOutInterceptors();
PhaseInterceptorChain chain = new PhaseChainCache().get(pm.getOutPhases(), i1, i2, i3);
chain.add(new ClientRequestFilterInterceptor());
return chain;
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!