public enum RequestType extends Enum<RequestType>
Enum Constant and Description |
---|
ACTION
The type for a portlet ActionRequest.
|
EVENT
The type for a portlet EventRequest.
|
RENDER
The type for a portlet RenderRequest.
|
RESOURCE
The type for a portlet ResourceRequest.
|
SERVLET
The type for all servlet requests.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isPortlet()
Returns
true if the response for this
RequestType originated from a JSR-168 or JSR-286
portlet container. |
boolean |
isRequestFromClient()
Returns
true if this request was a direct
result of a call from the client. |
boolean |
isResponseWritable()
Returns
true if the response for this
RequestType is intended to produce output to the client. |
static RequestType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RequestType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RequestType SERVLET
public static final RequestType RENDER
public static final RequestType ACTION
public static final RequestType RESOURCE
public static final RequestType EVENT
public static RequestType[] values()
for (RequestType c : RequestType.values()) System.out.println(c);
public static RequestType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isRequestFromClient()
true
if this request was a direct
result of a call from the client. This implies that
the current application is the "owner" of the current
request and that it has access to the inputStream, can
get and set character encodings, etc. Currently all
SERVLET, ACTION, and RESOURCE RequestTypes are client
requests.true
if the current request is a
client data type request and false
if it is not.public boolean isResponseWritable()
true
if the response for this
RequestType is intended to produce output to the client.
Currently the SERVLET, RENDER, and RESOURCE request are
response writable.true
if the current request is
intended to produce output and false
if it is not.public boolean isPortlet()
true
if the response for this
RequestType originated from a JSR-168 or JSR-286
portlet container. Currently RENDER, ACTION,
RESOURCE, and EVENT RequestTypes are all portlet
requests.true
if the current request
originated inside of a JSR-168 or JSR-286
Portlet Container or false
if
it did not.Copyright © 2020 The Apache Software Foundation. All rights reserved.