use of org.apache.cxf.feature.LoggingFeature in project camel by apache.
the class CxfBeanEndpoint method createServer.
private void createServer(List<Object> serviceBeans) {
Object obj = serviceBeans.get(0).getClass().getAnnotation(WebService.class);
if (obj != null) {
JaxWsServerFactoryBean bean = new JaxWsServerFactoryBean();
bean.setTransportId(CxfBeanTransportFactory.TRANSPORT_ID);
bean.setServiceClass(serviceBeans.get(0).getClass());
// set the bean instance as well, otherwise CXF will re-create a new instance of the class
bean.setServiceBean(serviceBeans.get(0));
if (bean.getJaxWsServiceFactory() != null) {
bean.getJaxWsServiceFactory().setPopulateFromClass(isPopulateFromClass());
}
bean.setBus(bus);
bean.setStart(true);
bean.setAddress("camel://" + createEndpointUri());
if (loggingFeatureEnabled) {
bean.getFeatures().add(new LoggingFeature());
}
server = bean.create();
} else {
JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
bean.setServiceBeans(serviceBeans);
bean.setAddress("camel://" + createEndpointUri());
bean.setStart(true);
bean.setTransportId(CxfBeanTransportFactory.TRANSPORT_ID);
bean.setBus(bus);
if (loggingFeatureEnabled) {
bean.getFeatures().add(new LoggingFeature());
}
bean.setProviders(providers);
server = bean.create();
}
}
use of org.apache.cxf.feature.LoggingFeature in project camel by apache.
the class RsServerBlueprintBean method setLoggingFeatureEnabled.
public void setLoggingFeatureEnabled(boolean loggingFeatureEnabled) {
if (loggingFeature != null) {
getFeatures().remove(loggingFeature);
loggingFeature = null;
}
if (loggingFeatureEnabled) {
if (getLoggingSizeLimit() > 0) {
loggingFeature = new LoggingFeature(getLoggingSizeLimit());
} else {
loggingFeature = new LoggingFeature();
}
getFeatures().add(loggingFeature);
}
}
use of org.apache.cxf.feature.LoggingFeature in project camel by apache.
the class SpringJAXRSServerFactoryBean method setLoggingSizeLimit.
public void setLoggingSizeLimit(int loggingSizeLimit) {
this.loggingSizeLimit = loggingSizeLimit;
if (loggingFeature != null) {
getFeatures().remove(loggingFeature);
if (loggingSizeLimit > 0) {
loggingFeature = new LoggingFeature(loggingSizeLimit);
} else {
loggingFeature = new LoggingFeature();
}
getFeatures().add(loggingFeature);
}
}
use of org.apache.cxf.feature.LoggingFeature in project camel by apache.
the class SpringJAXRSClientFactoryBean method setLoggingSizeLimit.
public void setLoggingSizeLimit(int loggingSizeLimit) {
this.loggingSizeLimit = loggingSizeLimit;
if (loggingFeature != null) {
getFeatures().remove(loggingFeature);
if (loggingSizeLimit > 0) {
loggingFeature = new LoggingFeature(loggingSizeLimit);
} else {
loggingFeature = new LoggingFeature();
}
getFeatures().add(loggingFeature);
}
}
use of org.apache.cxf.feature.LoggingFeature in project camel by apache.
the class RsClientBlueprintBean method setLoggingFeatureEnabled.
public void setLoggingFeatureEnabled(boolean loggingFeatureEnabled) {
if (loggingFeature != null) {
getFeatures().remove(loggingFeature);
loggingFeature = null;
}
if (loggingFeatureEnabled) {
if (getLoggingSizeLimit() > 0) {
loggingFeature = new LoggingFeature(getLoggingSizeLimit());
} else {
loggingFeature = new LoggingFeature();
}
getFeatures().add(loggingFeature);
}
}
Aggregations