org.apache.cxf.frontend
Class ServerFactoryBean
java.lang.Object
org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
org.apache.cxf.endpoint.AbstractEndpointFactory
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory
org.apache.cxf.frontend.ServerFactoryBean
- All Implemented Interfaces:
- InterceptorProvider
- Direct Known Subclasses:
- JaxWsServerFactoryBean
public class ServerFactoryBean
- extends AbstractWSDLBasedEndpointFactory
This class helps take a Service and
expose as a server side endpoint.
If there is no Service, it can create one for you using a
ReflectionServiceFactoryBean.
For most scenarios you'll want to just have the ServerFactoryBean handle everything
for you. In such a case, usage might look like this:
ServerFactoryBean sf = new ServerFactoryBean();
sf.setServiceClass(MyService.class);
sf.setAddress("http://localhost:8080/MyService");
sf.create();
You can also get more advanced and customize the service factory used:
ReflectionServiceFactory serviceFactory = new ReflectionServiceFactory();
serviceFactory.setServiceClass(MyService.class);
..
\/\/ Customize service factory here...
serviceFactory.setWrapped(false);
...
ServerFactoryBean sf = new ServerFactoryBean();
sf.setServiceFactory(serviceFactory);
sf.setAddress("http://localhost:8080/MyService");
sf.create();
| Fields inherited from class org.apache.cxf.endpoint.AbstractEndpointFactory |
address, bindingConfig, bindingFactory, bindingId, bus, conduitSelector, dataBinding, destinationFactory, endpointName, endpointReference, features, properties, serviceName, transportId |
| Methods inherited from class org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory |
createBindingInfo, createEndpoint, createEndpointInfo, getServiceClass, getServiceFactory, getWsdlURL, initializeAnnotationInterceptors, initializeAnnotationInterceptors, setServiceClass, setServiceFactory, setWsdlURL |
| Methods inherited from class org.apache.cxf.endpoint.AbstractEndpointFactory |
getAddress, getBindingConfig, getBindingFactory, getBindingId, getBus, getConduitSelector, getDataBinding, getDestinationFactory, getEndpointName, getFeatures, getProperties, getServiceName, getTransportId, setAddress, setBindingConfig, setBindingFactory, setBindingId, setBus, setConduitSelector, setDataBinding, setDestinationFactory, setEndpointName, setEndpointReference, setFeatures, setProperties, setServiceName, setTransportId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerFactoryBean
public ServerFactoryBean()
ServerFactoryBean
public ServerFactoryBean(ReflectionServiceFactoryBean sbean)
getBeanName
public java.lang.String getBeanName()
create
public Server create()
initializeServiceFactory
protected void initializeServiceFactory()
- Overrides:
initializeServiceFactory in class AbstractWSDLBasedEndpointFactory
applyFeatures
protected void applyFeatures()
applyExtraClass
protected void applyExtraClass()
createInvoker
protected Invoker createInvoker()
getServer
public Server getServer()
setServer
public void setServer(Server server)
isStart
public boolean isStart()
- Whether or not the Server should be started upon creation.
- Returns:
setStart
public void setStart(boolean start)
getServiceBean
public java.lang.Object getServiceBean()
getServiceBeanClass
public java.lang.Class<?> getServiceBeanClass()
setServiceBean
public void setServiceBean(java.lang.Object serviceBean)
- Set the backing service bean. If this is set a BeanInvoker is created for
the provided bean.
getSchemaLocations
public java.util.List<java.lang.String> getSchemaLocations()
setSchemaLocations
public void setSchemaLocations(java.util.List<java.lang.String> schemaLocations)
getInvoker
public Invoker getInvoker()
setInvoker
public void setInvoker(Invoker invoker)
Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.