com.vaadin.server.communication
Class UIInitHandler

java.lang.Object
  extended by com.vaadin.server.SynchronizedRequestHandler
      extended by com.vaadin.server.communication.UIInitHandler
All Implemented Interfaces:
RequestHandler, java.io.Serializable
Direct Known Subclasses:
PortletUIInitHandler, ServletUIInitHandler

public abstract class UIInitHandler
extends SynchronizedRequestHandler

Handles an initial request from the client to initialize a UI.

Since:
7.1
Author:
Vaadin Ltd
See Also:
Serialized Form

Field Summary
static java.lang.String BROWSER_DETAILS_PARAMETER
           
 
Constructor Summary
UIInitHandler()
           
 
Method Summary
protected  java.lang.String getInitialUidl(VaadinRequest request, UI uI)
          Generates the initial UIDL message that can e.g.
protected abstract  boolean isInitRequest(VaadinRequest request)
           
 boolean synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response)
          Identical to SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse) except the VaadinSession is locked before this is called and unlocked after this has completed.
 
Methods inherited from class com.vaadin.server.SynchronizedRequestHandler
handleRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BROWSER_DETAILS_PARAMETER

public static final java.lang.String BROWSER_DETAILS_PARAMETER
See Also:
Constant Field Values
Constructor Detail

UIInitHandler

public UIInitHandler()
Method Detail

isInitRequest

protected abstract boolean isInitRequest(VaadinRequest request)

synchronizedHandleRequest

public boolean synchronizedHandleRequest(VaadinSession session,
                                         VaadinRequest request,
                                         VaadinResponse response)
                                  throws java.io.IOException
Description copied from class: SynchronizedRequestHandler
Identical to SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse) except the VaadinSession is locked before this is called and unlocked after this has completed.

Specified by:
synchronizedHandleRequest in class SynchronizedRequestHandler
Parameters:
session - The session for the request
request - The request to handle
response - The response object to which a response can be written.
Returns:
true if a response has been written and no further request handlers should be called, otherwise false
Throws:
java.io.IOException - If an IO error occurred
See Also:
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)

getInitialUidl

protected java.lang.String getInitialUidl(VaadinRequest request,
                                          UI uI)
                                   throws org.json.JSONException,
                                          java.io.IOException
Generates the initial UIDL message that can e.g. be included in a html page to avoid a separate round trip just for getting the UIDL.

Parameters:
request - the request that caused the initialization
uI - the UI for which the UIDL should be generated
Returns:
a string with the initial UIDL message
Throws:
org.json.JSONException - if an exception occurs while encoding output
java.io.IOException


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.