org.apache.cxf.jaxrs
Class JAXRSServerFactoryBean
java.lang.Object
org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
org.apache.cxf.endpoint.AbstractEndpointFactory
org.apache.cxf.jaxrs.JAXRSServerFactoryBean
- All Implemented Interfaces:
- InterceptorProvider
public class JAXRSServerFactoryBean
- extends AbstractEndpointFactory
Bean to help easily create Server endpoints for JAX-RS. Example:
JAXRSServerFactoryBean sf = JAXRSServerFactoryBean();
sf.setResourceClasses(Book.class);
sf.setBindingId(JAXRSBindingFactory.JAXRS_BINDING_ID);
sf.setAddress("http://localhost:9080/");
sf.create();
This will start a server for you and register it with the ServerManager.
|
Field Summary |
protected boolean |
doInit
|
| Fields inherited from class org.apache.cxf.endpoint.AbstractEndpointFactory |
address, bindingConfig, bindingFactory, bindingId, bus, conduitSelector, dataBinding, destinationFactory, endpointName, endpointReference, features, properties, publishedEndpointUrl, serviceName, transportId |
| Methods inherited from class org.apache.cxf.endpoint.AbstractEndpointFactory |
getAddress, getBindingConfig, getBindingFactory, getBindingId, getBus, getConduitSelector, getDataBinding, getDestinationFactory, getEndpointName, getFeatures, getProperties, getPublishedEndpointUrl, getServiceName, getTransportId, setAddress, setBindingConfig, setBindingFactory, setBindingId, setBus, setConduitSelector, setDataBinding, setDestinationFactory, setEndpointName, setEndpointReference, setFeatures, setProperties, setPublishedEndpointUrl, setServiceName, setTransportId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
doInit
protected boolean doInit
JAXRSServerFactoryBean
public JAXRSServerFactoryBean()
JAXRSServerFactoryBean
public JAXRSServerFactoryBean(JAXRSServiceFactoryBean sf)
setSchemaLocations
public void setSchemaLocations(java.util.List<java.lang.String> schemas)
create
public Server create()
applyFeatures
protected void applyFeatures()
createInvoker
protected Invoker createInvoker()
createEndpoint
protected Endpoint createEndpoint()
throws BusException,
EndpointException
- Specified by:
createEndpoint in class AbstractEndpointFactory
- Throws:
BusException
EndpointException
createEndpointInfo
protected EndpointInfo createEndpointInfo()
throws BusException
- Specified by:
createEndpointInfo in class AbstractEndpointFactory
- Throws:
BusException
createBindingInfo
protected BindingInfo createBindingInfo()
- Specified by:
createBindingInfo in class AbstractEndpointFactory
setLanguageMappings
public void setLanguageMappings(java.util.Map<java.lang.Object,java.lang.Object> lMaps)
setExtensionMappings
public void setExtensionMappings(java.util.Map<java.lang.Object,java.lang.Object> extMaps)
getServiceFactory
public JAXRSServiceFactoryBean getServiceFactory()
setServiceFactory
public void setServiceFactory(JAXRSServiceFactoryBean serviceFactory)
getResourceClasses
public java.util.List<java.lang.Class> getResourceClasses()
setResourceClasses
public void setResourceClasses(java.util.List<java.lang.Class> classes)
setResourceClasses
public void setResourceClasses(java.lang.Class... classes)
setServiceBeans
public void setServiceBeans(java.lang.Object... beans)
- Set the backing service bean. If this is set, JAX-RS runtime will not be
responsible for the lifecycle of resource classes.
setServiceBeans
public void setServiceBeans(java.util.List<java.lang.Object> beans)
setResourceProvider
public void setResourceProvider(java.lang.Class c,
ResourceProvider rp)
getProviders
public java.util.List<?> getProviders()
- Returns:
- the entityProviders
setProviders
public void setProviders(java.util.List<? extends java.lang.Object> providers)
- Parameters:
entityProviders - the entityProviders to set
Apache CXF