org.apache.cxf.jaxrs
Class AbstractJAXRSFactoryBean
java.lang.Object
org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
org.apache.cxf.endpoint.AbstractEndpointFactory
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean
- All Implemented Interfaces:
- org.apache.cxf.interceptor.InterceptorProvider
- Direct Known Subclasses:
- JAXRSClientFactoryBean, JAXRSServerFactoryBean
public class AbstractJAXRSFactoryBean
- extends org.apache.cxf.endpoint.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.
| 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 |
checkPrivateEndpoint, getAddress, getBindingConfig, getBindingFactory, getBindingId, getBus, getConduitSelector, getDataBinding, getDestinationFactory, getEndpointName, getFeatures, getProperties, getPublishedEndpointUrl, getServiceName, getTransportId, initializeAnnotationInterceptors, initializeAnnotationInterceptors, setAddress, setBindingConfig, setBindingFactory, setBindingId, setBus, setConduitSelector, setDataBinding, setDestinationFactory, setEndpointName, setEndpointReference, setFeatures, setProperties, setPublishedEndpointUrl, setServiceName, setTransportId |
| 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 |
schemaLocations
protected List<String> schemaLocations
serviceFactory
protected JAXRSServiceFactoryBean serviceFactory
entityProviders
protected List<?> entityProviders
AbstractJAXRSFactoryBean
protected AbstractJAXRSFactoryBean()
AbstractJAXRSFactoryBean
protected AbstractJAXRSFactoryBean(JAXRSServiceFactoryBean serviceFactory)
createEndpointInfo
protected org.apache.cxf.service.model.EndpointInfo createEndpointInfo()
throws org.apache.cxf.BusException
- Specified by:
createEndpointInfo in class org.apache.cxf.endpoint.AbstractEndpointFactory
- Throws:
org.apache.cxf.BusException
createBindingInfo
protected org.apache.cxf.service.model.BindingInfo createBindingInfo()
- Specified by:
createBindingInfo in class org.apache.cxf.endpoint.AbstractEndpointFactory
getServiceFactory
public JAXRSServiceFactoryBean getServiceFactory()
setServiceFactory
public void setServiceFactory(JAXRSServiceFactoryBean serviceFactory)
createEndpoint
protected org.apache.cxf.endpoint.Endpoint createEndpoint()
throws org.apache.cxf.BusException,
org.apache.cxf.endpoint.EndpointException
- Specified by:
createEndpoint in class org.apache.cxf.endpoint.AbstractEndpointFactory
- Throws:
org.apache.cxf.BusException
org.apache.cxf.endpoint.EndpointException
setSchemaLocation
public void setSchemaLocation(String schema)
setSchemaLocations
public void setSchemaLocations(List<String> schemas)
getProviders
public List<?> getProviders()
- Returns:
- the entityProviders
setProviders
public void setProviders(List<? extends Object> providers)
- Parameters:
entityProviders - the entityProviders to set
setProvider
public void setProvider(Object provider)
checkResources
protected void checkResources(boolean server)
setupFactory
protected ProviderFactory setupFactory(org.apache.cxf.endpoint.Endpoint ep)
setDataBindingProvider
protected void setDataBindingProvider(ProviderFactory factory,
org.apache.cxf.service.Service s)
setModelBeans
public void setModelBeans(UserResource... resources)
setModelBeans
public void setModelBeans(List<UserResource> resources)
setModelBeansWithServiceClass
public void setModelBeansWithServiceClass(List<UserResource> resources,
Class<?>... sClasses)
setModelRef
public void setModelRef(String modelRef)
setModelRefWithServiceClass
public void setModelRefWithServiceClass(String modelRef,
Class<?>... sClasses)
Apache CXF