Enum Class Application.OperationMode
- All Implemented Interfaces:
Serializable
,Comparable<Application.OperationMode>
,Constable
- Enclosing interface:
- Application
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIn this mode, the request thread will be marked as UI thread in SWT.This mode behaves just likeJEE_COMAPTIBILTIY
but in addition it registers the required servlet filter to support clustering.In this mode, a separate UI thread will be started for each user session. -
Method Summary
Modifier and TypeMethodDescriptionstatic Application.OperationMode
Returns the enum constant of this class with the specified name.static Application.OperationMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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. As an alternative to blocking dialogs, the classDialog
provides a non-blockingopen
method that accepts a callback to react on the closing of a dialog. Moreover, the blockingBrowser
methodsexecute
andevaluate
are not supported in this mode. A non-blockingevaluate
method exists that also accepts a callback.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
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 methodDisplay.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
This mode behaves just likeJEE_COMAPTIBILTIY
but in addition it registers the required servlet filter to support clustering. This mode requires the servlet API 3.0.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-