FusionReactor API
v3.5.6

com.intergral.fusionreactor.api
Interface FusionRequestSurrogate


public interface FusionRequestSurrogate

This interface specifies the available proxied information from an internal FusionRequest. It is safe to store references to this object, since the data it encapsulates is copied from the underlying FusionRequest.

Since:
2.0
Version:
3.5.6

Method Summary
 String getAMFRequest()
          Get the AMF Request string which instigated this request.
 long getBytes()
          Get the total number of bytes transferred in the response.
 String getCfid()
          Get the value of the CFID cookie for this request, if available.
 String getCftoken()
          Get the value of the CFTOKEN cookie for this request, if available.
 String getCrashProtection()
          Get the Crash Protection rule currently operating on this request.
 int getCrashProtectionStatus()
          Get an integer describing the current status of Crash Protection with regard to this request.
 long getExecutionTime()
          Get the execution time of this request, in milliseconds.
 long getFusionRequestId()
          Get the tracking ID of this request.
 String getIpAddress()
          Get the IP address of the client.
 String getJavaSessionId()
          Gets the Java J2EE session ID associated with this request, if J2EE session management is in use and enabled.
 String getMethod()
          Get the HTTP request method which triggered this request.
 boolean getOutputCompressorState()
          Get a boolean describing whether the response to this request is being compressed.
 String getQueryString()
          Return the query string from the URL used to trigger this request.
 long getRequestId()
          Get the ID of this request.
 String getRequestStatus()
          Get the status of this request.
 URL getRequestUrl()
          Get the URL, with protocol and query arguments (if applicable) associated with this request.
 long getRuntime()
          Get the runtime for the request.
 long getStartTimeMillis()
          Get the time at which this request was raised inside FusionReactor, measured in milliseconds from the Java time datum (midnight on January 1st, 1970 UTC).
 int getStatusCode()
          Return the HTTP status code of this request's response, correct when this surrogate was obtained.
 String getThread()
          Get the name of the thread handling the request.
 long getThreadCpuTime()
          Return the time the thread spent on the processor cores.
 long getTimeClosed()
          Get the total elapsed time between starting the request and closing the reponse output.
 long getTimeOfDeath()
          Get the epoch time (measured in milliseconds from the Java time datum (midnight on January 1st, 1970 UTC) at which this request is eligible to be terminated due to Timeout Protection (if Timeout Protection is enabled, and this request is not immortal).
 long getTimeOpened()
          Get the elapsed time between starting the request and opening the response output.
 long getTtfb()
          Get the total time to first byte.
 long getTtlb()
          Get the total time to last byte.
 boolean isImmortal()
          Get a boolean describing whether this request is immortal.
 String jdbcGetRunningStatement()
          Get the running JDBC statement.
 String jdbcGetRunningStatementDatasource()
          Get the named datasource associated with the running statement.
 long jdbcGetRunningStatementStartTimeMillis()
          Get the time the currently-running JDBC statemet was started measured in milliseconds from the Java time datum (midnight on January 1st, 1970 UTC).
 long jdbcTotalExecutionTime()
          Get the total time spent executing queries.
 long jdbcTotalQueryCount()
          Get the total number of queries run.
 long jdbcTotalRows()
          Get the total number rows retrieved by all queries in this request.
 long jdbcTotalTime()
          Get the total time spent executing, retrieving and processing query data.
 boolean wasQueued()
          Get a boolean describing whether this request was queued before execution.
 

Method Detail

getFusionRequestId

long getFusionRequestId()
Get the tracking ID of this request.

Returns:
the FusionReactor-assigned Request ID of this request.
Since:
2.0

getRequestUrl

URL getRequestUrl()
Get the URL, with protocol and query arguments (if applicable) associated with this request.

Returns:
the request URL associated with this request
Since:
2.0

getStartTimeMillis

long getStartTimeMillis()
Get the time at which this request was raised inside FusionReactor, measured in milliseconds from the Java time datum (midnight on January 1st, 1970 UTC).

Returns:
the time at which this request was raised,
Since:
2.0

getRuntime

long getRuntime()
Get the runtime for the request. This field is computed by subtracting the current millisecond time from the time returned by getStartTimeMillis().

Returns:
the current runtime, measured in milliseconds.
Since:
2.0.3

getThread

String getThread()
Get the name of the thread handling the request.

Returns:
the name of the thread in which this request is running.
Since:
2.0.3

getIpAddress

String getIpAddress()
Get the IP address of the client.

Returns:
a string containing the dotted quad address of the client.
Since:
2.0.3

getMethod

String getMethod()
Get the HTTP request method which triggered this request.

Returns:
a string describing the method of this request.
Since:
3.2.0

jdbcGetRunningStatement

String jdbcGetRunningStatement()
Get the running JDBC statement.

Returns:
the JDBC statement currently being run by the request or null if no statement is running.
Since:
3.2.0

jdbcGetRunningStatementDatasource

String jdbcGetRunningStatementDatasource()
Get the named datasource associated with the running statement.

Returns:
the JDBC wrapper-supplied datasource of the running statement, or null if:
  • there is no running statement, or
  • there is no name available for the datatsource (i.e. it has not been supplied to the wrapper on the JDBC URL).
Since:
3.2.0

jdbcGetRunningStatementStartTimeMillis

long jdbcGetRunningStatementStartTimeMillis()
Get the time the currently-running JDBC statemet was started measured in milliseconds from the Java time datum (midnight on January 1st, 1970 UTC).

Returns:
the Java epoch time at which the current statement started, or -1 if no statement is running.
Since:
3.2.0

getOutputCompressorState

boolean getOutputCompressorState()
Get a boolean describing whether the response to this request is being compressed.

Returns:
a boolean describing the state of the response compressor.
Since:
3.2.0

getCfid

String getCfid()
Get the value of the CFID cookie for this request, if available.

This is an extension for the Adobe ColdFusion language.

Returns:
the value of the CFID cookie, or null if it is unavailable.
Since:
3.2.0

getCftoken

String getCftoken()
Get the value of the CFTOKEN cookie for this request, if available.

This is an extension for the Adobe ColdFusion language.

Returns:
the value of the CFTOKEN cookie or null if it is unavailable.

getJavaSessionId

String getJavaSessionId()
Gets the Java J2EE session ID associated with this request, if J2EE session management is in use and enabled.

Returns:
the ID of the Java J2EE session associated with this request or null if the session is unavailable.
Since:
3.2.0

wasQueued

boolean wasQueued()
Get a boolean describing whether this request was queued before execution.

Returns:
a boolean describing the queue status of this request.
Since:
3.2.0

getTimeOfDeath

long getTimeOfDeath()
Get the epoch time (measured in milliseconds from the Java time datum (midnight on January 1st, 1970 UTC) at which this request is eligible to be terminated due to Timeout Protection (if Timeout Protection is enabled, and this request is not immortal).

Returns:
the Java epoch time at which this request is due to be terminated, or 0 if:
  • the request is immortal (excluded from Request Protection)
  • Request Protection is disabled.
Since:
3.2.0
See Also:
FRAPI.isRequestProtectionActive()

isImmortal

boolean isImmortal()
Get a boolean describing whether this request is immortal. A request is considered immortal and immune to being terminated by Crash Protection if Timeout Protection is enabled and this request is excluded therefrom by Crash Protection Restrictions.

Returns:
  • true if Request Protection is enabled and this request is specifically excluded
  • false if Request Protection is disabled or is enabled, and this request is not specifically excluded.
    Since:
    3.2.0
    See Also:
    FRAPI.isRequestProtectionActive()

getRequestId

long getRequestId()
Get the ID of this request.

Returns:
a long representing the ID of this request.
Since:
3.2.0

getRequestStatus

String getRequestStatus()
Get the status of this request.

Returns:
one of:
  • PENDING - the request has not yet started
  • EXECUTING - the request is running
  • COMPLETED - the request has completed
  • UNKNOWN - the request state is unknown
Since:
3.2.0

getCrashProtection

String getCrashProtection()
Get the Crash Protection rule currently operating on this request.

Returns:
one of:
  • ManualKill - the request has been killed by an operator using the FusionReactor Administrator
  • TimeoutProtection - the request has timed out and is being rejected (or has already been so)
  • MemoryShortage - the request has been queued or rejected by the Memory Shortage protection
  • RequestQuantity - the request has been queued or rejected by the Request Quantity protection
or an empty string if no Crash Protection rule is operating on the request.
Since:
3.2.0

getCrashProtectionStatus

int getCrashProtectionStatus()
Get an integer describing the current status of Crash Protection with regard to this request.

Returns:
one of:
  • 0 - request rejected (bounced) - did not run at all.
  • 1 - request rejected (queued) - request exceeded the maximum queue time.
  • 2 - request notified - the request ran, but caused a Crash Protection 'notify' rule to fire.
  • 3 - request enqueued - the request has been placed in the run queue.
  • 4 - request timeout - the request has overrun the limit set by Timeout Protection has is being/has been killed.
  • 5 - Not Applicable.
  • 6 - request killed (FRAPI) - the request has been terminated by a FRAPI function call.
  • 7 - request killed (manual) - the request has been killed by an operator using the FusionReactor Administrator.
  • 8 - request alive (kill pending) - a kill has been attempted on this request, but it has not yet responded.
  • 9 - request canceled - the request entered the run queue, but was cancelled by an operator using the FusionReactor Administrator before it ran.
      or -1 if the request has no Crash Protection status.
      Since:
      3.2.0

getExecutionTime

long getExecutionTime()
Get the execution time of this request, in milliseconds.

Returns:
the execution time of this request, in milliseconds.
Since:
3.2.0

getQueryString

String getQueryString()
Return the query string from the URL used to trigger this request.

Returns:
the query string used to trigger this request or null if this is not available.
Since:
3.2.0

getStatusCode

int getStatusCode()
Return the HTTP status code of this request's response, correct when this surrogate was obtained. This code is not updated in the surrogate as the mirrored (live) code changes.

Returns:
the HTTP status code of this request's response. If the underlying J2EE mechanism has not yet set a status code, 200 will be returned (HTTP Status OK).
Since:
3.2.0

getThreadCpuTime

long getThreadCpuTime()
Return the time the thread spent on the processor cores. If this request has not yet completed, or the thread CPU usage could not be reliably determined, 0 is returned.

Returns:
the time spent active on processor core.
Since:
3.2.0

getAMFRequest

String getAMFRequest()
Get the AMF Request string which instigated this request.

Returns:
a comma-separated list of AMF request strings, one for each AMF Request body, or null if AMF was not used to invoke this request.
Since:
3.2.0

jdbcTotalQueryCount

long jdbcTotalQueryCount()
Get the total number of queries run.

Returns:
the total number of queries run by this request.
Since:
3.2.0

jdbcTotalTime

long jdbcTotalTime()
Get the total time spent executing, retrieving and processing query data.

Returns:
the total time, in milliseconds, from query statement open, to result set close.
Since:
3.2.0

jdbcTotalExecutionTime

long jdbcTotalExecutionTime()
Get the total time spent executing queries.

Returns:
the total time, in milliseconds, from query statement execution to result set becoming available.
Since:
3.2.0

jdbcTotalRows

long jdbcTotalRows()
Get the total number rows retrieved by all queries in this request.

Returns:
the total number of rows run.
Since:
3.2.0

getBytes

long getBytes()
Get the total number of bytes transferred in the response.

Returns:
the number of bytes sent to the response (but not necessarily flushed to the client yet).
Since:
3.2.0

getTtfb

long getTtfb()
Get the total time to first byte. This is the elapsed time from the start of the request to when the first byte was transferred to the response.

Returns:
the elapsed time to first byte or 0 if no bytes have yet been transferred.
Since:
3.2.0

getTtlb

long getTtlb()
Get the total time to last byte. This is the elapsed time from the start of the request to when the last byte was transferred to the response.

Returns:
the elapsed time to last byte or 0 if the request has not yet completed.
Since:
3.2.0

getTimeOpened

long getTimeOpened()
Get the elapsed time between starting the request and opening the response output.

Returns:
the elapsed open time of the response output.
Since:
3.2.0

getTimeClosed

long getTimeClosed()
Get the total elapsed time between starting the request and closing the reponse output.

Returns:
the elapsed close time of the response output.
Since:
3.2.0

FusionReactor API
v3.5.6

Copyright © 2005-2011 Intergral Information Solutions GmbH. All Rights Reserved.