本文整理了Java中org.apache.cxf.Bus.getInInterceptors()
方法的一些代码示例,展示了Bus.getInInterceptors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bus.getInInterceptors()
方法的具体详情如下:
包路径:org.apache.cxf.Bus
类名称:Bus
方法名:getInInterceptors
暂无
代码示例来源:origin: apache/cxf
public void setInInterceptors(List<Interceptor<? extends Message>> interceptors) {
if (bus != null) {
bus.getInInterceptors().addAll(interceptors);
} else {
super.setInInterceptors(interceptors);
}
}
代码示例来源:origin: org.jboss.ws.cxf/jbossws-cxf-client
public static void setup(Bus bus) {
if (!NO_LOCAL_BC && !BC_GLOBALLY_AVAILABLE) {
if (Holder.provider != null) {
bus.getInInterceptors().add(Holder.inInterceptor);
bus.getOutInterceptors().add(Holder.outInterceptor);
}
}
}
代码示例来源:origin: apache/cxf
public List<Interceptor<? extends Message>> getInInterceptors() {
if (bus != null) {
return bus.getInInterceptors();
}
return super.getInInterceptors();
}
代码示例来源: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: 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 setupInLogging() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(bos, true);
LoggingInInterceptor in = new LoggingInInterceptor(writer);
this.bus.getInInterceptors().add(in);
return bos;
}
代码示例来源: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: apache/cxf
protected void run() {
Bus bus = BusFactory.getDefaultBus();
setBus(bus);
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_SIGNED);
inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "bob.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
bus.getInInterceptors().add(inInterceptor);
broker.updateWsdl(bus, "testutils/jms_test.wsdl");
Endpoint.publish(null, new SecurityGreeterImplTwoWayJMS());
}
代码示例来源: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
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 = "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 = "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 = "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
protected static PhaseInterceptorChain setupInInterceptorChain(ClientConfiguration cfg) {
PhaseManager pm = cfg.getBus().getExtension(PhaseManager.class);
List<Interceptor<? extends Message>> i1 = cfg.getBus().getInInterceptors();
List<Interceptor<? extends Message>> i2 = cfg.getInInterceptors();
List<Interceptor<? extends Message>> i3 = cfg.getConduitSelector().getEndpoint().getInInterceptors();
PhaseInterceptorChain chain = new PhaseChainCache().get(pm.getInPhases(), i1, i2, i3);
chain.add(new ClientResponseFilterInterceptor());
return chain;
}
代码示例来源: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: 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);
}
内容来源于网络,如有侵权,请联系作者删除!