Skip to content

Commit

Permalink
[RESTEASY-1872] Fixed javadoc for resteasy-spring
Browse files Browse the repository at this point in the history
  • Loading branch information
jurakp authored and asoldano committed May 30, 2018
1 parent 414e6ef commit acdd2be
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 30 deletions.
Expand Up @@ -4,7 +4,7 @@

/**
* A MediaType PropertyEditor. Spring automatically looks for a class
* "<classname>Editor"
* "Editor"
*
* @author <a href="justin@justinedelson.com">Justin Edelson</a>
* @version $Revision$
Expand Down
Expand Up @@ -14,21 +14,18 @@
/**
* {@link org.springframework.beans.factory.FactoryBean} to generate a client
* proxy from a REST annotated interface.
* <p/>
* <p>
* Example: The following spring xml configuration snippet makes a bean with the
* id echoClient. The bean is a generated proxy of the a.b.c.Echo interface to
* access the remote service on http://server.far.far.away:8080/echo base URI.
* </p>
* <p/>
* <pre>
* &lt;bean id=&quot;echoClient&quot; class=&quot;org.jboss.resteasy.client.spring.RestClientProxyFactoryBean&quot;
* p:serviceInterface=&quot;a.b.c.Echo&quot; p:baseUri=&quot;http://server.far.far.away:8080/echo&quot; /&gt;
* </pre>
*
* @author Attila Kiraly
* @param <T>
* The type representing the client interface.
* @param <T> The type representing the client interface.
*/
public class RestClientProxyFactoryBean<T> implements FactoryBean<T>,
InitializingBean
Expand Down Expand Up @@ -145,7 +142,6 @@ public HttpClient getHttpClient()
* is the default in {@link org.apache.http.client.HttpClient}.
*
* @param httpClient the instance to be used by proxy generation
* @see ProxyFactory#create(Class, URI, HttpClient, ResteasyProviderFactory)
*/
public void setHttpClient(HttpClient httpClient)
{
Expand All @@ -162,9 +158,7 @@ public ClientExecutor getClientExecutor()
* used by proxy generation. If this property is set the {@link #httpClient}
* property is ignored.
*
* @param clientExecutor the instance to be used by proxy generation
* @see ProxyFactory#create(Class, URI, ClientExecutor,
* ResteasyProviderFactory)
* @param clientEngine the instance to be used by proxy generation
*/
public void setClientExecutor(ClientExecutor clientExecutor)
{
Expand Down
Expand Up @@ -37,18 +37,14 @@
* It also sets up Registry and ResteasyProviderFactory to be autowirable via @Autowire
* in Controllers/service layers.
* </p>
* <p/>
* <p>
* There's quite a bit of spring integration functionality under the covers:
* </p>
* <ol>
* <li>@Providers, such as RESTEasy interceptors and String converters have to
* be registered in RESTEasy before resources and registers. That gets a bit
* tricky, so depends-on functionality is used as well</li>
* <p/>
* <li>
* </ol>
* <p/>
*
* @author <a href="mailto:sduskis@gmail.com">Solomon Duskis</a>
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
Expand Down Expand Up @@ -86,25 +82,21 @@ public Object postProcessBeforeInitialization(Object bean, String beanName)

/**
* This method is invoked after postProcessBeanFactory.
* <p/>
* <p>
* this method is invoked when ever a new bean is created. This will
* perform the following:
* <p/>
* <ol>
* <p/>
* <li>RESTEasy injection of singleton @Providers, as well as @Provider
* registration</li>
* <p/>
* <li>either singleton or request/prototype RESTeasy injection... but not
* registration. The RESTEasy registration happens in the
* onApplicationEvent() below, which happens at the end of the Spring
* life-cycle</li>
* <p/>
* <li>merges the {@link ResteasyDeployment} bean with the user deployment</li>
* <p/>
* </ol>
*
* @see SpringBeanProcessor.postProcessBeanFactory
* @param bean bean
* @param beanName bean name
* @see SpringBeanProcessor#postProcessBeanFactory(ConfigurableListableBeanFactory)
*/
public Object postProcessAfterInitialization(Object bean, String beanName)
throws BeansException
Expand Down Expand Up @@ -244,12 +236,13 @@ public void setDispatcher(Dispatcher dispatcher)
* registers the RESTEasy Registry, ProviderFactry, and Dispatcher for @Autowire
* injection.
* </p>
* <p/>
* <p>
* Beyond tracking, this will ensure that non-MessageBody(Reader|Writer) @Providers
* are created by Spring before any resources by having the resources
* "depends-on" the @Providers.
* </p>
*
* @param beanFactory bean factory
*/
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException
Expand Down Expand Up @@ -348,9 +341,9 @@ public String getPropertyValue(
/**
* merge two arrays.
*
* @param dependsOn
* @param dependsOnProviders
* @return
* @param dependsOn first array
* @param dependsOnProviders second array
* @return merged array
*/
private static String[] concat(String[] dependsOn, String[] dependsOnProviders)
{
Expand All @@ -368,11 +361,11 @@ private static String[] concat(String[] dependsOn, String[] dependsOnProviders)
}

/**
* Get the bean class, and take @Configuration @Beans into consideration
* Get the bean class, and take @Configuration @Beans into consideration.
*
* @param beanDef
* @param beanFactory
* @return
* @param beanDef {@link BeanDefinition}
* @param beanFactory bean factory
* @return bean class
*/
private static Class<?> getBeanClass(String name, BeanDefinition beanDef,
ConfigurableListableBeanFactory beanFactory)
Expand Down Expand Up @@ -495,7 +488,8 @@ private static Class<?> getBeanClass(final String beanClassName)

/**
* Register all of the resources into RESTEasy only when Spring finishes it's
* life-cycle and the spring singleton bean creation is completed
* life-cycle and the spring singleton bean creation is completed.
* @param event application event
*/
@Override
public void onApplicationEvent(ApplicationEvent event)
Expand Down

0 comments on commit acdd2be

Please sign in to comment.