org.apache.cxf.frontend
Class ServerFactoryBean
java.lang.Object
org.apache.cxf.frontend.AbstractEndpointFactory
org.apache.cxf.frontend.ServerFactoryBean
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();
|
Method Summary |
org.apache.cxf.endpoint.Server |
create()
|
protected org.apache.cxf.service.invoker.Invoker |
createInvoker()
|
java.lang.String |
getBeanName()
|
org.apache.cxf.endpoint.Server |
getServer()
|
java.lang.Object |
getServiceBean()
|
boolean |
isStart()
Whether or not the Server should be started upon creation. |
void |
setServer(org.apache.cxf.endpoint.Server server)
|
void |
setServiceBean(java.lang.Object serviceBean)
Set the backing service bean. |
void |
setStart(boolean start)
|
| Methods inherited from class org.apache.cxf.frontend.AbstractEndpointFactory |
createEndpoint, createEndpointInfo, getAddress, getBindingFactory, getBus, getDestinationFactory, getEndpointName, getProperties, getServiceClass, getServiceFactory, getTransportId, setAddress, setBindingFactory, setBus, setDestinationFactory, setEndpointName, setProperties, setServiceClass, setServiceFactory, setTransportId |
| 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()
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 provide bean.
Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.