com.vaadin.terminal.gwt.server.


Class CommunicationManager

java.lang.Object
  com.vaadin.terminal.gwt.server.AbstractCommunicationManager
      com.vaadin.terminal.gwt.server.CommunicationManager

All Implemented Interfaces:

Paintable.RepaintRequestListener, Serializable

public class CommunicationManager
extends AbstractCommunicationManager

Application manager processes changes and paints for single application instance. This class handles applications running as servlets.

Since:

5.0

Version:

6.8.18

Author:

Vaadin Ltd.

See Also:

AbstractCommunicationManager, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.terminal.gwt.server.AbstractCommunicationManager
AbstractCommunicationManager.Callback, AbstractCommunicationManager.ErrorHandlerErrorEvent, AbstractCommunicationManager.InvalidUIDLSecurityKeyException, AbstractCommunicationManager.Request, AbstractCommunicationManager.Response, AbstractCommunicationManager.Session, AbstractCommunicationManager.SimpleMultiPartInputStream, AbstractCommunicationManager.URIHandlerErrorImpl
 
Field Summary
 
Fields inherited from class com.vaadin.terminal.gwt.server.AbstractCommunicationManager
VAR_ARRAYITEM_SEPARATOR, VAR_BURST_SEPARATOR, VAR_ESCAPE_CHARACTER
 
Constructor Summary
CommunicationManager(Application application)
          TODO New constructor - document me!
CommunicationManager(Application application, AbstractApplicationServlet applicationServlet)
          Deprecated. use CommunicationManager(Application) instead
 
Method Summary
 void cleanStreamVariable(VariableOwner owner, String name)
           
 StreamVariable getStreamVariable(String paintableId, String variableName)
          Gets a stream variable based on paintable id and variable name.
 String getStreamVariableTargetUrl(VariableOwner owner, String name, StreamVariable value)
           
 void handleFileUpload(HttpServletRequest request, HttpServletResponse response)
          Handles file upload request submitted via Upload component.
 void handleUidlRequest(HttpServletRequest request, HttpServletResponse response, AbstractApplicationServlet applicationServlet, Window window)
          Handles UIDL request TODO document
protected  void unregisterPaintable(Component p)
          Called when communication manager stops listening for repaints for given component.
 
Methods inherited from class com.vaadin.terminal.gwt.server.AbstractCommunicationManager
changeVariables, closeJsonMessage, decodeVariableValue, doGetApplicationWindow, doHandleSimpleMultipartFileUpload, doHandleUidlRequest, doHandleXhrFilePost, getApplication, getPaintableId, getRequestPayload, getVariableOwner, handleURI, handleVariableBurst, hasPaintableId, highlightPaintable, isProductionMode, makeAllPaintablesDirty, openJsonMessage, printHighlightedComponentHierarchy, repaintRequested, requireLocale, sendUploadResponse, setProductionMode, streamToReceiver, writeUidlResponce
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommunicationManager

@Deprecated
public CommunicationManager(Application application,
                                       AbstractApplicationServlet applicationServlet)

Deprecated. use CommunicationManager(Application) instead

Parameters:
application -
applicationServlet -

CommunicationManager

public CommunicationManager(Application application)

TODO New constructor - document me!

Parameters:
application -

Method Detail

handleFileUpload

public void handleFileUpload(HttpServletRequest request,
                             HttpServletResponse response)
                      throws IOException,
                             AbstractCommunicationManager.InvalidUIDLSecurityKeyException

Handles file upload request submitted via Upload component.

Parameters:
request -
response -
Throws:
IOException
InvalidUIDLSecurityKeyException
AbstractCommunicationManager.InvalidUIDLSecurityKeyException
See Also:
#getStreamVariableTargetUrl(ReceiverOwner, String, StreamVariable)

getStreamVariable

public StreamVariable getStreamVariable(String paintableId,
                                        String variableName)

Gets a stream variable based on paintable id and variable name. Returns null if no matching variable has been registered.

Parameters:
paintableId - id of paintable to get variable for
variableName - name of the stream variable
Returns:
the corresponding stream variable, or null if not found

handleUidlRequest

public void handleUidlRequest(HttpServletRequest request,
                              HttpServletResponse response,
                              AbstractApplicationServlet applicationServlet,
                              Window window)
                       throws IOException,
                              ServletException,
                              AbstractCommunicationManager.InvalidUIDLSecurityKeyException

Handles UIDL request TODO document

Parameters:
request -
response -
applicationServlet -
window - target window of the UIDL request, can be null if window not found
Throws:
IOException
ServletException
AbstractCommunicationManager.InvalidUIDLSecurityKeyException

unregisterPaintable

protected void unregisterPaintable(Component p)

Description copied from class: AbstractCommunicationManager

Called when communication manager stops listening for repaints for given component.

Overrides:
unregisterPaintable in class AbstractCommunicationManager

getStreamVariableTargetUrl

public String getStreamVariableTargetUrl(VariableOwner owner,
                                         String name,
                                         StreamVariable value)

cleanStreamVariable

public void cleanStreamVariable(VariableOwner owner,
                                String name)

Specified by:
cleanStreamVariable in class AbstractCommunicationManager