use of org.apache.cxf.feature.FastInfosetFeature in project cxf by apache.
the class CXFAPINamespaceHandler method parse.
@SuppressWarnings("deprecation")
public Metadata parse(Element element, ParserContext context) {
String s = element.getLocalName();
if ("bus".equals(s)) {
// parse bus
return new BusDefinitionParser().parse(element, context);
} else if ("logging".equals(s)) {
// logging feature
return new SimpleBPBeanDefinitionParser(org.apache.cxf.feature.LoggingFeature.class).parse(element, context);
} else if ("fastinfoset".equals(s)) {
// fastinfosetfeature
return new SimpleBPBeanDefinitionParser(FastInfosetFeature.class).parse(element, context);
} else if ("workqueue".equals(s)) {
return new SimpleBPBeanDefinitionParser(AutomaticWorkQueueImpl.class) {
@Override
public String getId(Element element, ParserContext context) {
String id = element.hasAttribute("id") ? element.getAttribute("id") : null;
if (id == null) {
id = "cxf.workqueue.";
id += element.hasAttribute("name") ? element.getAttribute("name") : "def";
}
return id;
}
@Override
protected void processNameAttribute(Element element, ParserContext ctx, MutableBeanMetadata bean, String val) {
bean.addProperty("name", createValue(ctx, val));
}
}.parse(element, context);
}
return null;
}
use of org.apache.cxf.feature.FastInfosetFeature in project tomee by apache.
the class CXFAPINamespaceHandler method parse.
@SuppressWarnings("deprecation")
public Metadata parse(Element element, ParserContext context) {
String s = element.getLocalName();
if ("bus".equals(s)) {
// parse bus
return new BusDefinitionParser().parse(element, context);
} else if ("logging".equals(s)) {
// logging feature
return new SimpleBPBeanDefinitionParser(org.apache.cxf.feature.LoggingFeature.class).parse(element, context);
} else if ("fastinfoset".equals(s)) {
// fastinfosetfeature
return new SimpleBPBeanDefinitionParser(FastInfosetFeature.class).parse(element, context);
} else if ("workqueue".equals(s)) {
return new SimpleBPBeanDefinitionParser(AutomaticWorkQueueImpl.class) {
@Override
public String getId(Element element, ParserContext context) {
String id = element.hasAttribute("id") ? element.getAttribute("id") : null;
if (id == null) {
id = "cxf.workqueue.";
id += element.hasAttribute("name") ? element.getAttribute("name") : "def";
}
return id;
}
@Override
protected void processNameAttribute(Element element, ParserContext ctx, MutableBeanMetadata bean, String val) {
bean.addProperty("name", createValue(ctx, val));
}
}.parse(element, context);
}
return null;
}
Aggregations