|
FusionReactor API v2.0.4 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.intergral.fusionreactor.api.FRAPI
public abstract class FRAPI
This class defines the public interface to FusionReactor.
All API calls internally check whether FusionReactor is available before proceding. Storing references to objects produced by this type any longer than strictly necessary (certainly not longer than the course of a single page request) is strongly discouraged, in order to reduce the scope for memory leaks. This object itself may be stored and reused if required.
This is a factory-type class; you must not instantiate it yourself, rather use the
getInstance()
method.
Field Summary | |
---|---|
static int |
KILL_STATUS_ALREADY_DISPOSED
Indicates this request has already been disposed of, i.e. |
static int |
KILL_STATUS_ALREADY_NOTIFIED
Indicates this request has already been notified of a kill action by some other mechanism. |
static int |
KILL_STATUS_KILLED
Indicates this request was killed. |
Method Summary | |
---|---|
abstract String |
explainKillStatus(int killStatus)
Explain a given kill result value. |
static FRAPI |
getInstance()
Get a concrete instance of the FusionReactor API, on which further calls can be made. |
abstract ConfigurationSurrogate |
getRunningConfiguration()
Return a deep-clone of the currently running configuration. |
abstract FusionRequestSurrogate[] |
getRunningRequests()
Return an array containing objects representing all requests currently being tracked by FusionReactor. |
abstract boolean |
isFusionReactorRunning()
Attempt to locate FusionReactor in memory and return a boolean indicating success or failure. |
abstract int |
kill(long fusionRequestId,
String userTraceMarker)
Kill a running request. |
abstract void |
setPageTimeout(int seconds)
Reset the timeout value for this page. |
abstract void |
setRequestCaptureFolder(String fullPath)
Change the location to which Request Capture will store request and response data. |
abstract void |
setRunningConfiguration(ConfigurationSurrogate configurationSurrogate)
Set the running configuration to the passed ConfigurationSurrogate . |
abstract void |
trace(String traceString)
Attach a user trace string to this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int KILL_STATUS_ALREADY_DISPOSED
public static final int KILL_STATUS_ALREADY_NOTIFIED
public static final int KILL_STATUS_KILLED
Method Detail |
---|
public static final FRAPI getInstance()
Get a concrete instance of the FusionReactor API, on which further calls can be made.
public abstract void trace(String traceString)
Attach a user trace string to this request. These strings are available within the FusionReactor GUI in the Request Details page, and also appear in the FusionReactor debug console.
If FusionReactor is not running, this method does nothing.
traceString
- The string to be attached to this request.public abstract boolean isFusionReactorRunning()
Attempt to locate FusionReactor in memory and return a boolean indicating success or failure.
public abstract void setPageTimeout(int seconds)
Reset the timeout value for this page. If Timeout Protection is not active within FusionReactor, calls to this method have no effect. If Timeout Protection is active, the value passed to this method overrides the value configured in FusionReactor.
If FusionReactor is not running, this method does nothing.
seconds
- the timeout in seconds after which this page will be aborted.public abstract FusionRequestSurrogate[] getRunningRequests()
Return an array containing objects representing all requests currently being tracked by FusionReactor. There is a small time penalty associated with this method, since it must temporarily lock FusionReactor to obtain the list of running requests.
N.b. By the time your code uses the objects returned by this method, they may have completed.
FusionRequestSurrogate
objects representing all
running tracked requests, or a zero-length array if FusionReactor was not detected.public abstract ConfigurationSurrogate getRunningConfiguration()
Return a deep-clone of the currently running configuration. It is safe to manipulate this object.
ConfigurationSurrogate
object constructed as a deep-clone of the
running configuration, which may be manipulated safely.public abstract void setRunningConfiguration(ConfigurationSurrogate configurationSurrogate) throws ConfigurationInvalidExceptionSurrogate, FileNotFoundException, IOException
Set the running configuration to the passed ConfigurationSurrogate
. The
sequence of actions is as follows:
configurationSurrogate
- a ConfigurationSurrogate
object representing the required
configuration.
ConfigurationInvalidExceptionSurrogate
- if the configuration was invalid (examine the message of the exception to find
out more)
FileNotFoundException
- if the system could not find the file or folder into which the configuration
should be saved
IOException
- if the system encountered an IOException
whilst saving the
configuration to disk.public abstract void setRequestCaptureFolder(String fullPath) throws ConfigurationInvalidExceptionSurrogate, IOException
fullPath
- a full path specifying a folder which exists on the system.
ConfigurationInvalidExceptionSurrogate
- with a descriptive message, if FusionReactor could not adopt the new
configuration.
IOException
- if FusionReactor could not open write a new configuration prior to adopting it.public abstract int kill(long fusionRequestId, String userTraceMarker)
fusionRequestId
- the ID of the request which is to be killeduserTraceMarker
- if non-null and not an empty string, this trace marker will be stored with the
request.
KILL_STATUS_*
set of enumerations
defined in this type.public abstract String explainKillStatus(int killStatus)
killStatus
- the status to be explained.
|
FusionReactor API v2.0.4 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |