|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.dsp.RequestConfig
A collection of attributes which control how a Data Service method is to be invoked. RequestConfig also serves as a channel for returning "out-of-band" information, such as server audit reports, to the client.
Feature flags are attributes that are simply either enabled or
disabled. By default, all features are disabled. You enable them
with RequestConfig.enableFeature(String)
, and disable them with RequestConfig.disableFeature(java.lang.String)
.
String attributes are assigned values with RequestConfig.setStringAttribute(String,String)
. All default to null.
String array attributes are assigned values with RequestConfig.setStringArrayAttribute(String,String[])
. All default to null.
Integer attributes are assigned values with RequestConfig.setIntegerAttribute(String,int)
. All default to 0.
The set of valid attributes are represented by public String constants on this class.
Field Summary | |
static java.lang.String |
COMPILE_ONLY
Feature flag requesting query processor only compile the query, not execute it. |
static java.lang.String |
DO_NOT_CACHE_QUERY_PLAN
Feature flag requesting query processor not to cache compiled execution plan |
static java.lang.String |
FORCE_COMPILE
Feature flag requesting query processor recompile query, instead of using any previously-cached version. |
static java.lang.String |
GET_CURRENT_DATA
Feature flag requesting that cached content should be ignored, data computed and cached entries used in the current query refreshed |
static java.lang.String |
OUTPUT_FILENAME
String attribute which allows you to specify a filename on the server where the server will serialize the results of the function/query execution. |
static java.lang.String |
REFRESH_CACHE_EARLY
Integer attribute requesting that a cached data record must be valid for at least the specified number of seconds. |
static java.lang.String |
RETURN_AUDIT_PROPERTIES
String array attribute which allows you to list the audit properties which should be collected during this function/query execution. |
static java.lang.String |
RETURN_DATA_SERVICE_AUDIT
Feature flag requesting query processor return all returnable audit properties collected during query execution. |
static java.lang.String |
TIMEOUT
Integer attribute specifying maximum time the query engine should allow for this request to complete (in milliseconds). |
Constructor Summary | |
RequestConfig()
|
Method Summary | |
RequestConfig |
assignFilter(FilterXQuery filter)
Sets a filtering condition to be applied to the results of data service function execution. |
void |
disableFeature(java.lang.String featureName)
Disable a specified feature flag for this query execution. |
RequestConfig |
enableFeature(java.lang.String featureName)
Enable a specified feature flag for this query execution. |
boolean |
featureEnabled(java.lang.String featureName)
Inquire whether a particular feature is enabled or not for this query execution. |
FilterXQuery |
getFilter()
Retrieve a previously-assigned FilterXQuery for further manipulation. |
int |
getIntegerAttribute(java.lang.String attributeName)
Return the current value of an integer attribute. |
java.lang.String[] |
getStringArrayAttribute(java.lang.String attributeName)
Return the current value of a String array attribute. |
java.lang.String |
getStringAttribute(java.lang.String attributeName)
Return the current value of a String attribute. |
DataServiceAudit |
retrieveDataServiceAudit()
Retrieve the collected audit materials from query execution. |
void |
setFilter(FilterXQuery filter)
Sets a filtering condition to be applied to the results of data service function execution. |
RequestConfig |
setIntegerAttribute(java.lang.String attributeName,
int value)
Assign an integer value to an integer attribute. |
RequestConfig |
setStringArrayAttribute(java.lang.String attributeName,
java.lang.String[] value)
Assign a String[] value to a String array attribute. |
RequestConfig |
setStringAttribute(java.lang.String attributeName,
java.lang.String value)
Assign a String value to a String attribute. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String COMPILE_ONLY
DataService.invoke(String,
Object[], RequestConfig)
) will return null.
public static final java.lang.String FORCE_COMPILE
public static final java.lang.String DO_NOT_CACHE_QUERY_PLAN
public static final java.lang.String RETURN_DATA_SERVICE_AUDIT
RequestConfig.retrieveDataServiceAudit()
after method execution.
public static final java.lang.String RETURN_AUDIT_PROPERTIES
public static final java.lang.String GET_CURRENT_DATA
public static final java.lang.String REFRESH_CACHE_EARLY
public static final java.lang.String OUTPUT_FILENAME
FileWriter
). This filename must be in an existent
directory on the server; the server will not attempt to create
the output directory.
If this option is specified, then the results of the request
will not be returned to the client; the method
this RequestConfig object is passed to (eg., DataService.invoke(String,
Object[], RequestConfig)
) will return null.
This attribute is not compatible with
com.bea.dsp.dsmediator.client.StreamingDataService.invokeToStream(String,Object[],RequestConfig)
or
{@link com.bea.dsp.dsmediator.client.StreamingPreparedExpression.executeQueryToStream(RequestConfig),
and specifying it when calling either method will result in an
error.
public static final java.lang.String TIMEOUT
Note: If the request is participating in an EJB transaction, then the EJB's transaction timeout (trans-timeout-seconds in the deployment descriptor) may override this timeout if the EJB's timeout is smaller.
Constructor Detail |
public RequestConfig()
Method Detail |
public RequestConfig enableFeature(java.lang.String featureName)
public void disableFeature(java.lang.String featureName)
enableFeature()
.)
public boolean featureEnabled(java.lang.String featureName)
public RequestConfig setStringAttribute(java.lang.String attributeName, java.lang.String value)
public java.lang.String getStringAttribute(java.lang.String attributeName)
public RequestConfig setStringArrayAttribute(java.lang.String attributeName, java.lang.String[] value)
public java.lang.String[] getStringArrayAttribute(java.lang.String attributeName)
public RequestConfig setIntegerAttribute(java.lang.String attributeName, int value)
public int getIntegerAttribute(java.lang.String attributeName)
public void setFilter(FilterXQuery filter)
filter
- The FilterXQuery
public RequestConfig assignFilter(FilterXQuery filter)
Note: This function is
identical to RequestConfig.setFilter(FilterXQuery)
except that it
returns the RequestConfig object. This is useful for chaining
RequestConfig calls, such as:
RequestConfig rc = new RequestConfig().assignFilter(filt).enableFeature(...);The version named setFilter must return void so that it may serve as a Javabean getter method.
filter
- The FilterXQuery
public FilterXQuery getFilter()
public DataServiceAudit retrieveDataServiceAudit()
This will return null unless the feature flag RequestConfig.RETURN_DATA_SERVICE_AUDIT
was enabled.
This field will be populated in all cases possible, including most cases where the invocation throws an exception.
Note: This method is not called getDataServiceAudit() to prevent being treated as a Javabean getter method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |