org.apache.cxf.frontend
Class ServerFactoryBean
java.lang.Object
org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
org.apache.cxf.frontend.AbstractEndpointFactory
org.apache.cxf.frontend.ServerFactoryBean
- All Implemented Interfaces:
- org.apache.cxf.interceptor.InterceptorProvider
public class ServerFactoryBean
- extends AbstractEndpointFactory
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();
| Methods inherited from class org.apache.cxf.frontend.AbstractEndpointFactory |
createBindingInfo, createEndpoint, createEndpointInfo, findBestEndpointInfo, getAddress, getBindingConfig, getBindingFactory, getBindingId, getBus, getConduitSelector, getDestinationFactory, getEndpointName, getFeatures, getProperties, getServiceClass, getServiceFactory, getTransportId, getWsdlURL, setAddress, setBindingConfig, setBindingId, setBus, setConduitSelector, setDestinationFactory, setEndpointName, setEndpointReference, setFeatures, setProperties, setServiceClass, setServiceFactory, setTransportId, setWsdlURL |
| Methods inherited from class org.apache.cxf.interceptor.AbstractBasicInterceptorProvider |
getInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptors, setInFaultInterceptors, setInInterceptors, setOutFaultInterceptors, setOutInterceptors |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerFactoryBean
public ServerFactoryBean()
getBeanName
public java.lang.String getBeanName()
create
public org.apache.cxf.endpoint.Server create()
applyFeatures
protected void applyFeatures()
applyExtraClass
protected void applyExtraClass()
createInvoker
protected org.apache.cxf.service.invoker.Invoker createInvoker()
getServer
public org.apache.cxf.endpoint.Server getServer()
setServer
public void setServer(org.apache.cxf.endpoint.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()
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.
Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.