org.apache.cxf.service.invoker.Factory Java Examples
The following examples show how to use
org.apache.cxf.service.invoker.Factory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnnotationsFactoryBeanListener.java From cxf with Apache License 2.0 | 5 votes |
private void setScope(Server server, Class<?> cls) { FactoryType scope = cls.getAnnotation(FactoryType.class); if (scope != null) { Invoker i = server.getEndpoint().getService().getInvoker(); if (i instanceof FactoryInvoker) { Factory f; if (scope.factoryClass() == FactoryType.DEFAULT.class) { switch (scope.value()) { case Session: if (scope.args().length > 0) { f = new SessionFactory(cls, Boolean.parseBoolean(scope.args()[0])); } else { f = new SessionFactory(cls); } break; case PerRequest: f = new PerRequestFactory(cls); break; case Pooled: f = new PooledFactory(cls, Integer.parseInt(scope.args()[0])); break; default: f = new SingletonFactory(cls); break; } } else { try { f = scope.factoryClass().getConstructor(Class.class, String[].class) .newInstance(cls, scope.args()); } catch (Throwable t) { throw new ServiceConstructionException(t); } } ((FactoryInvoker)i).setFactory(f); } } }
Example #2
Source File: KumuluzWSInvoker.java From kumuluzee with MIT License | 4 votes |
public KumuluzWSInvoker(final Class<?> targetClass, final Object targetBean) { super((Factory) null); this.targetClass = targetClass; this.targetBean = targetBean; }
Example #3
Source File: AbstractJAXWSMethodInvoker.java From cxf with Apache License 2.0 | 4 votes |
public AbstractJAXWSMethodInvoker(Factory factory) { super(factory); }
Example #4
Source File: JAXWSMethodInvoker.java From cxf with Apache License 2.0 | 4 votes |
public JAXWSMethodInvoker(Factory factory) { super(factory); }