|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Object
java.lang.Enum<RequestType>
org.apache.myfaces.trinidad.util.RequestType
public enum RequestType
Represents the type of request currently in the ExternalContext. All servlet requests will be of the SERVLET requestType whereas all of the other RequestTypes will be portlet type requests. There are a number of convenience methods on the RequestType enumeration which can be used to determine the capabilities of the current request.
| Enum Constant Summary | |
|---|---|
ACTIONThe type for a portlet ActionRequest. |
|
EVENTThe type for a portlet EventRequest. |
|
RENDERThe type for a portlet RenderRequest. |
|
RESOURCEThe type for a portlet ResourceRequest. |
|
SERVLETThe type for all servlet requests. |
|
| Method Summary | |
|---|---|
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(java.lang.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. |
| 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 |
|---|
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
| Method Detail |
|---|
public static RequestType[] values()
for (RequestType c : RequestType.values())
System.out.println(c);
public static RequestType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.