|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cxf.interceptor.AbstractBasicInterceptorProvider
org.apache.cxf.endpoint.AbstractEndpointFactory
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory
org.apache.cxf.frontend.ServerFactoryBean
public class ServerFactoryBean
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();
Field Summary |
---|
Fields inherited from class org.apache.cxf.endpoint.AbstractEndpointFactory |
---|
address, bindingConfig, bindingFactory, bindingId, bus, conduitSelector, dataBinding, destinationFactory, endpointName, endpointReference, features, properties, publishedEndpointUrl, serviceName, transportId |
Constructor Summary | |
---|---|
ServerFactoryBean()
|
|
ServerFactoryBean(ReflectionServiceFactoryBean sbean)
|
Method Summary | |
---|---|
protected void |
applyExtraClass()
|
protected void |
applyFeatures()
|
Server |
create()
|
protected Invoker |
createInvoker()
|
java.lang.String |
getBeanName()
|
Invoker |
getInvoker()
|
java.util.List<java.lang.String> |
getSchemaLocations()
|
Server |
getServer()
|
java.lang.Object |
getServiceBean()
|
java.lang.Class<?> |
getServiceBeanClass()
|
java.lang.String |
getWsdlLocation()
|
protected void |
initializeServiceFactory()
|
boolean |
isStart()
Whether or not the Server should be started upon creation. |
void |
setInvoker(Invoker invoker)
|
void |
setSchemaLocations(java.util.List<java.lang.String> schemaLocations)
|
void |
setServer(Server server)
|
void |
setServiceBean(java.lang.Object serviceBean)
Sets the bean implementing the service. |
void |
setStart(boolean start)
Specifies if the Server should be started upon creation. |
void |
setWsdlLocation(java.lang.String location)
Specifies the location of the WSDL defining the service interface used by the factory to create services. |
Methods inherited from class org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory |
---|
createBindingInfo, createEndpoint, createEndpointInfo, createSoapBindingConfig, getServiceClass, getServiceFactory, getWsdlURL, initializeAnnotationInterceptors, initializeAnnotationInterceptors, setServiceClass, setServiceFactory, 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 |
Constructor Detail |
---|
public ServerFactoryBean()
public ServerFactoryBean(ReflectionServiceFactoryBean sbean)
Method Detail |
---|
public java.lang.String getBeanName()
public Server create()
protected void initializeServiceFactory()
initializeServiceFactory
in class AbstractWSDLBasedEndpointFactory
protected void applyFeatures()
protected void applyExtraClass()
protected Invoker createInvoker()
public Server getServer()
public void setServer(Server server)
public boolean isStart()
false
if the server should not be started upon creationpublic void setStart(boolean start)
false
tells the factory that the Server will be
started manually using the start method.
start
- false
specifies that the Server will not be started upon creationpublic java.lang.Object getServiceBean()
public java.lang.Class<?> getServiceBeanClass()
public void setServiceBean(java.lang.Object serviceBean)
BeanInvoker
is created for the provided bean.
serviceBean
- an instantiated implementaiton objectpublic java.util.List<java.lang.String> getSchemaLocations()
public void setSchemaLocations(java.util.List<java.lang.String> schemaLocations)
public Invoker getInvoker()
public void setInvoker(Invoker invoker)
public void setWsdlLocation(java.lang.String location)
locaiton
- the URL of the WSDL defining the service interfacepublic java.lang.String getWsdlLocation()
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |