net.sf.gwtspringrpc
Class URLBeanNameResolver

java.lang.Object
  extended by net.sf.gwtspringrpc.URLBeanNameResolver
All Implemented Interfaces:
Serializable, BeanNameResolver

public class URLBeanNameResolver
extends Object
implements BeanNameResolver, Serializable

This class implements a BeanNameResolver that ascertains the bean name by using the last token of the request URL. If this token contains a period, everything after the period will be ignored.

For example, given a URL of http://www.example.com, an application name of TestApp, and an endpoint name of submitPage.do, the URL will be:

http://www.example.com/TestApp/submitPage.do

The bean name would then be submitPage.

Since:
1.0
Author:
Mike Clemens
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
URLBeanNameResolver()
           
 
Method Summary
 String getBeanName(ServletContext servletContext, HttpServletRequest request)
          Retrieves the last token of the URL as the bean name to delegate to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

URLBeanNameResolver

public URLBeanNameResolver()
Method Detail

getBeanName

public String getBeanName(ServletContext servletContext,
                          HttpServletRequest request)
Retrieves the last token of the URL as the bean name to delegate to.

Specified by:
getBeanName in interface BeanNameResolver
Parameters:
servletContext - The servlet context
request - The HTTP servlet request
Returns:
The name of the bean to delegate to