Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.dsp
Class RequestConfig

    java.lang.Object
      com.bea.dsp.RequestConfig

public final class RequestConfig
extends java.lang.Object

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

### COMPILE_ONLY

    public static final java.lang.String COMPILE_ONLY

  Feature flag requesting query processor only compile the query, not execute it. Note: If this flag is specified, the method this RequestConfig object is passed to (eg., `DataService.invoke(String, Object[], RequestConfig)`) will return null.

  See Also:
    Constant Field Values

### FORCE_COMPILE

    public static final java.lang.String FORCE_COMPILE

  Feature flag requesting query processor recompile query, instead of using any previously-cached version.

  See Also:
    Constant Field Values

### DO_NOT_CACHE_QUERY_PLAN

    public static final java.lang.String DO_NOT_CACHE_QUERY_PLAN

  Feature flag requesting query processor not to cache compiled execution plan

  See Also:
    Constant Field Values

### RETURN_DATA_SERVICE_AUDIT

    public static final java.lang.String RETURN_DATA_SERVICE_AUDIT

  Feature flag requesting query processor return all returnable audit properties collected during query execution. If this flag is enabled, or when specific audit properties had been requested using RETURN_AUDIT_PROPERTIES, the `DataServiceAudit` containing the collected audit materials will be available via `RequestConfig.retrieveDataServiceAudit()` after method execution.

  See Also:
    Constant Field Values

### RETURN_AUDIT_PROPERTIES

    public static final 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.

  See Also:
    Constant Field Values

### GET_CURRENT_DATA

    public static final 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

  See Also:
    Constant Field Values

### REFRESH_CACHE_EARLY

    public static final 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. This effectively shortens TTL specified for that chached value.

  See Also:
    Constant Field Values

### OUTPUT_FILENAME

    public static final 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. This filename must make sense to the server process (it will be passed directly to a `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.

  See Also:
    Constant Field Values

### TIMEOUT

    public static final java.lang.String TIMEOUT

  Integer attribute specifying maximum time the query engine should allow for this request to complete (in milliseconds). After this time has elapsed, the query will be terminated, much as it can be via the DSP administration console's Monitoring tab.

  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.

  See Also:
    Constant Field Values

Constructor Detail

### RequestConfig

    public RequestConfig()

Method Detail

### enableFeature

    public RequestConfig enableFeature(java.lang.String featureName)

  Enable a specified feature flag for this query execution.

  Returns:
    this RequestConfig (for chained calls).

### disableFeature

    public void disableFeature(java.lang.String featureName)

  Disable a specified feature flag for this query execution. (All features are disabled by default until enabled by calling `enableFeature()`.)

### featureEnabled

    public boolean featureEnabled(java.lang.String featureName)

  Inquire whether a particular feature is enabled or not for this query execution.

  Returns:
    this RequestConfig (for chained calls).

### setStringAttribute

    public RequestConfig setStringAttribute(java.lang.String attributeName,
                                            java.lang.String value)

  Assign a String value to a String attribute.

### getStringAttribute

    public java.lang.String getStringAttribute(java.lang.String attributeName)

  Return the current value of a String attribute.

### setStringArrayAttribute

    public RequestConfig setStringArrayAttribute(java.lang.String attributeName,
                                                 java.lang.String[] value)

  Assign a String[] value to a String array attribute.

### getStringArrayAttribute

    public java.lang.String[] getStringArrayAttribute(java.lang.String attributeName)

  Return the current value of a String array attribute.

### setIntegerAttribute

    public RequestConfig setIntegerAttribute(java.lang.String attributeName,
                                             int value)

  Assign an integer value to an integer attribute.

### getIntegerAttribute

    public int getIntegerAttribute(java.lang.String attributeName)

  Return the current value of an integer attribute.

### setFilter

    public void setFilter(FilterXQuery filter)

  Sets a filtering condition to be applied to the results of data service function execution. Filters will be applied to any of the objects in the hierarchy of the field path, e.g., either to CUSTOMER or ORDER if the field is CUSTOMER/ORDER/TOTAL_ORDER_AMOUNT.

  Parameters:
    `filter` - The `FilterXQuery`
  Returns:
    this RequestConfig (for chained calls).

### assignFilter

    public RequestConfig assignFilter(FilterXQuery filter)

  Sets a filtering condition to be applied to the results of data service function execution. Filters will be applied to any of the objects in the hierarchy of the field path, e.g., either to CUSTOMER or ORDER if the field is CUSTOMER/ORDER/TOTAL_ORDER_AMOUNT.

  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.

  Parameters:
    `filter` - The `FilterXQuery`
  Returns:
    this RequestConfig (for chained calls).

### getFilter

    public FilterXQuery getFilter()

  Retrieve a previously-assigned FilterXQuery for further manipulation.

### retrieveDataServiceAudit

    public DataServiceAudit retrieveDataServiceAudit()

  Retrieve the collected audit materials from query execution. It only makes sense to call this method *after* this `RequestConfig` object has been passed to a client `invoke` method and that method has returned.

  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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems Inc. All Rights Reserved.