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:
- InterceptorProvider
- Direct Known Subclasses:
- JAXRSClientFactoryBean, JAXRSServerFactoryBean
public class AbstractJAXRSFactoryBean
- 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.
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 |
schemaLocations
protected java.util.List<java.lang.String> schemaLocations
serviceFactory
protected JAXRSServiceFactoryBean serviceFactory
entityProviders
protected java.util.List<?> entityProviders
AbstractJAXRSFactoryBean
protected AbstractJAXRSFactoryBean()
AbstractJAXRSFactoryBean
protected AbstractJAXRSFactoryBean(JAXRSServiceFactoryBean serviceFactory)
createEndpointInfo
protected EndpointInfo createEndpointInfo()
throws BusException
- Specified by:
createEndpointInfo
in class AbstractEndpointFactory
- Throws:
BusException
createBindingInfo
protected BindingInfo createBindingInfo()
- Specified by:
createBindingInfo
in class AbstractEndpointFactory
getServiceFactory
public JAXRSServiceFactoryBean getServiceFactory()
setServiceFactory
public void setServiceFactory(JAXRSServiceFactoryBean serviceFactory)
createEndpoint
protected Endpoint createEndpoint()
throws BusException,
EndpointException
- Specified by:
createEndpoint
in class AbstractEndpointFactory
- Throws:
BusException
EndpointException
setSchemaLocation
public void setSchemaLocation(java.lang.String schema)
setSchemaLocations
public void setSchemaLocations(java.util.List<java.lang.String> schemas)
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
setProvider
public void setProvider(java.lang.Object provider)
checkResources
protected void checkResources()
setupFactory
protected ProviderFactory setupFactory(Endpoint ep)
Apache CXF