com.ibm.websphere.webcontainer.async

Interface AsyncRequestDispatcherConfig


  1. public interface AsyncRequestDispatcherConfig
AsyncRequestDispatcherConfig is used to pass custom config for a particular request dispatcher including error messages, timeouts, etc. If various encodings are not specified, the default encoding value of the top level response's getCharacterEncoding() method is used.

Method Summary

Modifier and Type Method and Description
  1. void
addThreadLocalToPropagate(java.lang.ThreadLocal threadLocals)
Since the AsynchBeans executes the includes on a non-child thread, InheritableThreadLocals will not work so a mechanism is provided to propagate them
  1. java.lang.String
getExecutionTimeoutEncoding()
Return the encoding used for the message displayed if the maximum length of time for the execution of an include has been reached
  1. java.lang.String
getExecutionTimeoutMessage()
Return the message displayed if the maximum length of time for the execution of an include is reached.
  1. int
getExecutionTimeoutOverride()
Return the maximum length of time allowed for the execution of an include
  1. int
getExpirationTimeoutOverride()
Retrieve the maximum amount of time results can be in the results store where it is still retrievable by the client.
  1. java.lang.String
getOutputRetrievalFailureEncoding()
Return the encoding used for the message displayed for any error that causes the output to be unretrievable.
  1. java.lang.String
getOutputRetrievalFailureMessage()
Return the message displayed for any error that causes the output to be unretrievable.
  1. java.lang.String
getRejectedEncoding()
Returns the encoding used to display the message when work is rejected
  1. java.lang.String
getRejectedMessage()
Return the message displayed when an include is rejected by the work manager
  1. java.util.List<java.lang.ThreadLocal>
getThreadLocalsToPropagate()
Since the AsynchBeans executes the includes on a non-child thread, InheritableThreadLocals will not work.
  1. void
initThreadLocals()
Since the AsynchBeans executes the includes on a non-child thread, InheritableThreadLocals will not work.
  1. boolean
isRetriable()
If isRetriable is true, a rejected include will attempt to be executed again.
  1. boolean
isTransferState()
This must be set if the developer needs request attributes and internal headers returned to the top level request.
  1. boolean
isUseDefaultJavascript()
Returns true when ARD sends the javascript to aggregate the content on the client side.
  1. void
setExecutionTimeoutMessage(java.lang.String message,java.lang.String encoding)
Set the message displayed if the maximum length of time for the execution of an include is reached
  1. void
setExecutionTimeoutOverride(int ms)
Set the maximum length of time allowed for the execution of an include.
  1. void
setExpirationTimeoutOverride(int includeTimeout)
Maximum amount of time results can be in the results store where it is still retrievable by the client.
  1. void
setOutputRetrievalFailureMessage(java.lang.String message,java.lang.String encoding)
Set the message displayed for any error that causes the output to be unretrievable, such as the result expiring from the results store.
  1. void
setRejectedMessage(java.lang.String rejectedMessage,java.lang.String rejectedEncoding)
Set the message displayed when an include is rejected by the work manager
  1. void
setRetriable(boolean retriable)
Set whether or not we will retry the include if we've received a rejected work item.
  1. void
setTransferState(boolean state)
Set the value of transfer state.
  1. void
setUseDefaultJavascript(boolean useDefaultJavascript)
sets whether to allow ARD to insert javascript into customer code to retrieve results for client-side aggregation.

Method Detail

setExpirationTimeoutOverride

  1. void setExpirationTimeoutOverride( int includeTimeout)
Maximum amount of time results can be in the results store where it is still retrievable by the client.
Parameters:
includeTimeout - timeout value in ms

getExpirationTimeoutOverride

  1. int getExpirationTimeoutOverride( )
Retrieve the maximum amount of time results can be in the results store where it is still retrievable by the client.
Returns:
timeout value in ms

setOutputRetrievalFailureMessage

  1. void setOutputRetrievalFailureMessage( java.lang.String message,
  2. java.lang.String encoding)
Set the message displayed for any error that causes the output to be unretrievable, such as the result expiring from the results store.
Parameters:
message - custom failure message
encoding -

getOutputRetrievalFailureMessage

  1. java.lang.String getOutputRetrievalFailureMessage( )
Return the message displayed for any error that causes the output to be unretrievable. This include expiration of content.
Returns:
failure message

getOutputRetrievalFailureEncoding

  1. java.lang.String getOutputRetrievalFailureEncoding( )
Return the encoding used for the message displayed for any error that causes the output to be unretrievable.
Returns:
encoding

setExecutionTimeoutOverride

  1. void setExecutionTimeoutOverride( int ms)
Set the maximum length of time allowed for the execution of an include. Does not apply to insertFragmentBlocking calls.
Parameters:
ms - timeout in ms

setExecutionTimeoutMessage

  1. void setExecutionTimeoutMessage( java.lang.String message,
  2. java.lang.String encoding)
Set the message displayed if the maximum length of time for the execution of an include is reached
Parameters:
message - custom timeout message
encoding -

getExecutionTimeoutMessage

  1. java.lang.String getExecutionTimeoutMessage( )
Return the message displayed if the maximum length of time for the execution of an include is reached. The default value is 60000 ms (or one minute). If this execution timeout is reached, but the actual include results are ready once the data can be flushed, preference is given to the actual results to be sent.
Returns:
timeout message

getExecutionTimeoutOverride

  1. int getExecutionTimeoutOverride( )
Return the maximum length of time allowed for the execution of an include
Returns:
timeout in ms

getExecutionTimeoutEncoding

  1. java.lang.String getExecutionTimeoutEncoding( )
Return the encoding used for the message displayed if the maximum length of time for the execution of an include has been reached
Returns:
encoding

setRejectedMessage

  1. void setRejectedMessage(java.lang.String rejectedMessage,
  2. java.lang.String rejectedEncoding)
Set the message displayed when an include is rejected by the work manager
Parameters:
rejectedMessage - custom error message
rejectedEncoding - encoding

getRejectedMessage

  1. java.lang.String getRejectedMessage( )
Return the message displayed when an include is rejected by the work manager
Returns:
error message

getRejectedEncoding

  1. java.lang.String getRejectedEncoding( )
Returns the encoding used to display the message when work is rejected
Returns:
encdoding

isRetriable

  1. boolean isRetriable()
If isRetriable is true, a rejected include will attempt to be executed again. Default is false.
Returns:
true/false

setRetriable

  1. void setRetriable(boolean retriable)
Set whether or not we will retry the include if we've received a rejected work item.
Parameters:
retriable -

isTransferState

  1. boolean isTransferState()
This must be set if the developer needs request attributes and internal headers returned to the top level request. This only works for insertFragmentBlocking since that is the only insertion method that guarantees the top level request still exists.
Returns:
true/false

setTransferState

  1. void setTransferState(boolean state)
Set the value of transfer state.
Parameters:
state -

isUseDefaultJavascript

  1. boolean isUseDefaultJavascript( )
Returns true when ARD sends the javascript to aggregate the content on the client side. Returns false when the customer must implement their own code to aggregate content on the client side. They should retrieve the request attribute "com.ibm.websphere.webcontainer.ard.endpointURI" to get this endpoint and then make XMLHttpRequests to retrieve the results
Returns:
true/false

setUseDefaultJavascript

  1. void setUseDefaultJavascript(boolean useDefaultJavascript)
sets whether to allow ARD to insert javascript into customer code to retrieve results for client-side aggregation.
Parameters:
useDefaultJavascript -

addThreadLocalToPropagate

  1. void addThreadLocalToPropagate( java.lang.ThreadLocal threadLocals)
Since the AsynchBeans executes the includes on a non-child thread, InheritableThreadLocals will not work so a mechanism is provided to propagate them
Parameters:
threadLocals -

getThreadLocalsToPropagate

  1. java.util.List<java.lang.ThreadLocal> getThreadLocalsToPropagate( )
Since the AsynchBeans executes the includes on a non-child thread, InheritableThreadLocals will not work. This method allows the retrieval of the current set that need to be propagated.

initThreadLocals

  1. void initThreadLocals()
Since the AsynchBeans executes the includes on a non-child thread, InheritableThreadLocals will not work. This method clears the list of ThreadLocals to propagate if any were set on a previous request.