Eclipse Remote Application Platform

org.eclipse.rap.rwt.application
Enum Application.OperationMode

java.lang.Object
  extended by java.lang.Enum<Application.OperationMode>
      extended by org.eclipse.rap.rwt.application.Application.OperationMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Application.OperationMode>
Enclosing interface:
Application

public static enum Application.OperationMode
extends java.lang.Enum<Application.OperationMode>

Instances of this class represent a mode of operation for an RWT application. The major difference between the operation modes is whether a separate UI thread is started for every session (SWT_COMPATIBILITY) or not (JEE_COMPATIBILITY).


Enum Constant Summary
JEE_COMPATIBILITY
          In this mode, the request thread will be marked as UI thread in SWT.
SESSION_FAILOVER
          This mode behaves just like JEE_COMAPTIBILTIY but in addition it registers the required servlet filter to support clustering.
SWT_COMPATIBILITY
          In this mode, a separate UI thread will be started for each user session.
 
Method Summary
static Application.OperationMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Application.OperationMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JEE_COMPATIBILITY

public static final Application.OperationMode JEE_COMPATIBILITY
In this mode, the request thread will be marked as UI thread in SWT. Information that is attached to the request thread, such as security or transaction contexts, can be directly accessed. This mode is compatible with the JEE specification.

As its only limitation, it does not support the SWT main loop (more specifically, the method Display.sleep() is not implemented). As a consequence, blocking dialogs aren't possible with this operation mode. Instead of blocking dialogs, the class DialogUtil allows to attach a callback to react on the closing of a dialog.

Unless there is a need for blocking dialogs (e.g. when using the Eclipse workbench), this mode is recommended as it is more lightweight than SWT_COMPATIBILITY .


SWT_COMPATIBILITY

public static final Application.OperationMode SWT_COMPATIBILITY
In this mode, a separate UI thread will be started for each user session. All UI requests are processed in this thread while the request thread is put on hold. After processing all events, the method Display.sleep() lets the request thread continue and puts the UI thread to sleep. This approach fully supports the SWT main loop and thus also allows for blocking dialogs.

Information that is attached to the request thread, such as security or transaction contexts, can only be accessed using the method RWT.requestThreadExec(Runnable).


SESSION_FAILOVER

public static final Application.OperationMode SESSION_FAILOVER
This mode behaves just like JEE_COMAPTIBILTIY but in addition it registers the required servlet filter to support clustering. This mode requires the servlet API 3.0.

Method Detail

values

public static Application.OperationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Application.OperationMode c : Application.OperationMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Application.OperationMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

Eclipse Remote Application Platform

Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.