Groovy Documentation

com.vaadin.grails.terminal.gwt.server
[Java] Class GrailsAwareGAEApplicationServlet

java.lang.Object
  com.vaadin.terminal.gwt.server.GAEApplicationServlet
      com.vaadin.grails.terminal.gwt.server.GrailsAwareGAEApplicationServlet

@SuppressWarnings("serial")
public class GrailsAwareGAEApplicationServlet
extends GAEApplicationServlet

Authors:
Les Hazlewood
Rodney Schneider
Francis McKenzie


Field Summary
private String applicationClassName

Name of the class that extends com.vaadin.Application.

private static org.slf4j.Logger log

 
Constructor Summary
GrailsAwareGAEApplicationServlet()

 
Method Summary
private ClassLoader doGetClassLoader()

protected Class getApplicationClass()

protected ClassLoader getClassLoader()

Returns the Grails ClassLoader, because the servlet's ClassLoader can't see the Grails application source.

org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication()

protected Application getNewApplication(HttpServletRequest request)

void init(ServletConfig servletConfig)

Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

protected void service(HttpServletRequest httpReq, HttpServletResponse response)

protected void writeAjaxPageHtmlVaadinScripts(Window window, String themeName, Application application, java.io.BufferedWriter out, String appUrl, String themeUri, String appId, HttpServletRequest request)

Adds the JavaScript libraries configured in VaadinConfig to the head of the HTML page.

 

Field Detail

applicationClassName

private String applicationClassName
Name of the class that extends com.vaadin.Application. We don't retain the actual Class instance directly due to Grails class reloading - the Application class or any that it references could be reloaded dynamically at runtime during development, so we look up the class with this name from the classloader every time it is requested when creating a new Application instance.


log

private static final org.slf4j.Logger log


 
Constructor Detail

GrailsAwareGAEApplicationServlet

GrailsAwareGAEApplicationServlet()


 
Method Detail

doGetClassLoader

private ClassLoader doGetClassLoader()


getApplicationClass

@Override
@SuppressWarnings({ "unchecked" })
protected Class getApplicationClass()


getClassLoader

@Override
protected ClassLoader getClassLoader()
Returns the Grails ClassLoader, because the servlet's ClassLoader can't see the Grails application source.
throws:
ServletException
Returns:
the ClassLoader stored in the org.codehaus.groovy.grails.commons.GrailsApplication


getGrailsApplication

public org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication()


getNewApplication

@Override
protected Application getNewApplication(HttpServletRequest request)


init

@SuppressWarnings("unchecked")
@Override
public void init(ServletConfig servletConfig)
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

This implementation caches the application class name (not the class itself) to use to acquire the Application class from the Grails classloader at runtime.

throws:
ServletException if an exception has occurred that interferes with the servlet's normal operation.
Parameters:
servletConfig - the object containing the servlet's configuration and initialization parameters


service

@Override
protected void service(HttpServletRequest httpReq, HttpServletResponse response)


writeAjaxPageHtmlVaadinScripts

@Override
protected void writeAjaxPageHtmlVaadinScripts(Window window, String themeName, Application application, java.io.BufferedWriter out, String appUrl, String themeUri, String appId, HttpServletRequest request)
Adds the JavaScript libraries configured in VaadinConfig to the head of the HTML page.


 

Groovy Documentation