|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.interceptor.AbstractBasicInterceptorProvider org.apache.cxf.endpoint.AbstractEndpointFactory org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean
public class AbstractJAXRSFactoryBean
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 List<?> |
entityProviders
|
protected List<String> |
schemaLocations
|
protected JAXRSServiceFactoryBean |
serviceFactory
|
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 | |
---|---|
protected |
AbstractJAXRSFactoryBean()
|
protected |
AbstractJAXRSFactoryBean(JAXRSServiceFactoryBean serviceFactory)
|
Method Summary | |
---|---|
protected void |
checkResources(boolean server)
|
protected BindingInfo |
createBindingInfo()
|
protected Endpoint |
createEndpoint()
|
protected EndpointInfo |
createEndpointInfo()
|
Bus |
getBus()
|
List<?> |
getProviders()
|
JAXRSServiceFactoryBean |
getServiceFactory()
Returns the service factory |
void |
setBus(Bus bus)
|
protected void |
setDataBindingProvider(ProviderFactory factory,
Service s)
|
void |
setModelBeans(List<UserResource> resources)
Sets the description of root resources. |
void |
setModelBeans(UserResource... resources)
Sets the description of root resources. |
void |
setModelBeansWithServiceClass(List<UserResource> resources,
Class<?>... sClasses)
Sets the description of root resources with the list of concrete classes. |
void |
setModelRef(String modelRef)
Sets a reference to the external user model, Example: "classpath:/model/resources.xml" |
void |
setModelRefWithServiceClass(String modelRef,
Class<?>... sClasses)
Sets a reference to the external user model, Example: "classpath:/model/resources.xml". |
void |
setProvider(Object provider)
Sets a custom JAX-RS provider. |
void |
setProviders(List<? extends Object> providers)
Sets custom JAX-RS providers. |
void |
setSchemaLocation(String schema)
Sets the location of the schema which can be used to validate the incoming XML or JAXB-driven JSON. |
void |
setSchemaLocations(List<String> schemas)
Sets the locations of the schemas which can be used to validate the incoming XML or JAXB-driven JSON. |
void |
setServiceFactory(JAXRSServiceFactoryBean serviceFactory)
Sets the custom service factory which processes the registered classes and providers |
void |
setServiceName(QName name)
|
protected ProviderFactory |
setupFactory(Endpoint ep)
|
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 |
Field Detail |
---|
protected List<String> schemaLocations
protected JAXRSServiceFactoryBean serviceFactory
protected List<?> entityProviders
Constructor Detail |
---|
protected AbstractJAXRSFactoryBean()
protected AbstractJAXRSFactoryBean(JAXRSServiceFactoryBean serviceFactory)
Method Detail |
---|
public Bus getBus()
getBus
in class AbstractEndpointFactory
public void setServiceName(QName name)
setServiceName
in class AbstractEndpointFactory
public void setBus(Bus bus)
setBus
in class AbstractEndpointFactory
protected EndpointInfo createEndpointInfo() throws BusException
createEndpointInfo
in class AbstractEndpointFactory
BusException
protected BindingInfo createBindingInfo()
createBindingInfo
in class AbstractEndpointFactory
public JAXRSServiceFactoryBean getServiceFactory()
public void setServiceFactory(JAXRSServiceFactoryBean serviceFactory)
serviceFactory
- the factoryprotected Endpoint createEndpoint() throws BusException, EndpointException
createEndpoint
in class AbstractEndpointFactory
BusException
EndpointException
public void setSchemaLocation(String schema)
schema
- the schema locationpublic void setSchemaLocations(List<String> schemas)
schema
- the schema locationspublic List<?> getProviders()
public void setProviders(List<? extends Object> providers)
entityProviders
- the entityProviderspublic void setProvider(Object provider)
provider
- the custom provider.protected void checkResources(boolean server)
protected ProviderFactory setupFactory(Endpoint ep)
protected void setDataBindingProvider(ProviderFactory factory, Service s)
public void setModelBeans(UserResource... resources)
resources
- root resource descriptionspublic void setModelBeans(List<UserResource> resources)
resources
- root resource descriptionspublic void setModelBeansWithServiceClass(List<UserResource> resources, Class<?>... sClasses)
resources
- root resource descriptions.sClasses
- concrete root resource classespublic void setModelRef(String modelRef)
modelRef
- the reference to the external model resource.public void setModelRefWithServiceClass(String modelRef, Class<?>... sClasses)
modelRef
- the reference to the external model resource.sClasses
- concrete root resource classes
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |