|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.scripting.engine.Variable
com.sun.slamd.scripting.http.HTTPClientVariable
This class defines a variable that can be used to manage the interaction with one or more servers using HTTP 1.1. An HTTP client variable provides the following methods:
| Field Summary | |
static java.lang.String |
BLIND_TRUST_METHOD_NAME
The name of the method that can be used to determine whether the client has been configured to blindly trust any SSL certificate. |
static int |
BLIND_TRUST_METHOD_NUMBER
The method number for the "blindTrust" method. |
static java.lang.String |
CLEAR_COOKIES_METHOD_NAME
The name of the method that can be used to clear all cookie information associated with this HTTP client. |
static int |
CLEAR_COOKIES_METHOD_NUMBER
The method number for the "clearCookies" method. |
static java.lang.String |
CLOSE_ALL_METHOD_NAME
The name of the method that can be used to close all connections associated with this HTTP client. |
static int |
CLOSE_ALL_METHOD_NUMBER
The method number for the "closeAll" method. |
static java.lang.String |
COOKIES_ENABLED_METHOD_NAME
The name of the method that can be used to determine if cookie support is enabled. |
static int |
COOKIES_ENABLED_METHOD_NUMBER
The method number for the "cookiesEnabled" method. |
static java.lang.String |
DISABLE_AUTHENTICATION_METHOD_NAME
The name of the method that indicates that no authentication information should be included in requests sent using this client. |
static int |
DISABLE_AUTHENTICATION_METHOD_NUMBER
The method number for the "disableAuthentication" method. |
static java.lang.String |
DISABLE_DEBUG_MODE_METHOD_NAME
The name of the method that indicates that the client should stop operating in debug mode. |
static int |
DISABLE_DEBUG_MODE_METHOD_NUMBER
The method number for the "disableDebugMode" method. |
static java.lang.String |
DISABLE_PROXY_METHOD_NAME
The name of the method that indicates that no proxy server should be used when sending requests using this client. |
static int |
DISABLE_PROXY_METHOD_NUMBER
The method number for the "disableProxy" method. |
static java.lang.String |
DISABLE_STATISTICS_METHOD_NAME
The name of the method that indicates that statistics collection should be disabled. |
static int |
DISABLE_STATISTICS_METHOD_NUMBER
The method number for the "disableStatistics" method. |
static java.lang.String |
ENABLE_AUTHENTICATION_METHOD_NAME
The name of the method that indicates that authentication should be used when sending requests using this client. |
static int |
ENABLE_AUTHENTICATION_METHOD_NUMBER
The method number for the "enableAuthentication" method. |
static java.lang.String |
ENABLE_DEBUG_MODE_METHOD_NAME
The name of the method that indicates that the client should operate in debug mode. |
static int |
ENABLE_DEBUG_MODE_METHOD_NUMBER
The method number for the "enableDebugMode" method. |
static int |
ENABLE_PROXY_1_METHOD_NUMBER
The method number for the first "enableProxy" method. |
static int |
ENABLE_PROXY_2_METHOD_NUMBER
The method number for the second "enableProxy" method. |
static java.lang.String |
ENABLE_PROXY_METHOD_NAME
The name of the method that indicates that requests sent using this client should be forwarded through a proxy server. |
static java.lang.String |
ENABLE_STATISTICS_METHOD_NAME
The name of the method that indicates whether the client should maintain a number of statistics about the request processing. |
static int |
ENABLE_STATISTICS_METHOD_NUMBER
The method number for the "enableStatistics" method. |
static java.lang.String |
FOLLOW_REDIRECTS_METHOD_NAME
The name of the method that indicates whether this client will automatically follow redirects encountered while processing requests. |
static int |
FOLLOW_REDIRECTS_METHOD_NUMBER
The method number for the "followRedirects" method. |
static java.lang.String |
GET_FAILURE_REASON_METHOD_NAME
The name of the method that can be used to determine the reason for the failure of the last operation processed using this client. |
static int |
GET_FAILURE_REASON_METHOD_NUMBER
The method number for the "getFailureReason" method. |
static Method[] |
HTTP_CLIENT_VARIABLE_METHODS
The set of methods associated with HTTP client variables. |
static java.lang.String |
HTTP_CLIENT_VARIABLE_TYPE
The name that will be used for the data type of HTTP client variables. |
static java.lang.String |
REMOVE_COMMON_HEADER_METHOD_NAME
The name of the method that can be used to remove a common header from this client. |
static int |
REMOVE_COMMON_HEADER_METHOD_NUMBER
The method number for the "removeCommonHeader" method. |
static java.lang.String |
RETRIEVE_ASSOCIATED_FILES_METHOD_NAME
The name of the method that indicates whether this client will automatically retrieve any files associated with an HTML document retrieved as part of processing requests. |
static int |
RETRIEVE_ASSOCIATED_FILES_METHOD_NUMBER
The method number for the "retrieveAssociatedFiles" method. |
static int |
SEND_REQUEST_1_METHOD_NUMBER
The method number for the first "sendRequest" method. |
static int |
SEND_REQUEST_2_METHOD_NUMBER
The method number for the second "sendRequest" method. |
static java.lang.String |
SEND_REQUEST_METHOD_NAME
The name of the method that may be used to send a request using this HTTP client. |
static java.lang.String |
SET_BLIND_TRUST_METHOD_NAME
The name of the method that can be used to specify whether the client should blindly trust any SSL certificate. |
static int |
SET_BLIND_TRUST_METHOD_NUMBER
The method number for the "setBlindTrust" method. |
static java.lang.String |
SET_COMMON_HEADER_METHOD_NAME
The name of the method that can be used to set a common header to include in all requests sent using this client. |
static int |
SET_COMMON_HEADER_METHOD_NUMBER
The method number for the "setCommonHeader" method. |
static java.lang.String |
SET_COOKIES_ENABLED_METHOD_NAME
The name of the method that can be used to specify whether cookie support should be enabled. |
static int |
SET_COOKIES_ENABLED_METHOD_NUMBER
The method number for the "setCookiesEnabled" method. |
static java.lang.String |
SET_FOLLOW_REDIRECTS_METHOD_NAME
The name of the method that specifies whether this HTTP client should automatically follow any redirects encountered while processing requests. |
static int |
SET_FOLLOW_REDIRECTS_METHOD_NUMBER
The method number for the "setFollowRedirects" method. |
static java.lang.String |
SET_RETRIEVE_ASSOCIATED_FILES_METHOD_NAME
The name of the method that specifies whether this HTTP client should automatically retrieve any files associated with an HTML document retrieved as part of processing requests. |
static int |
SET_RETRIEVE_ASSOCIATED_FILES_METHOD_NUMBER
The method number for the "setRetrieveAssociatedFiles" method. |
static java.lang.String |
SET_USE_KEEPALIVE_METHOD_NAME
The name of the method that specifies whether this HTTP client should use keep-alive in order to try to reuse a connection for multiple requests. |
static int |
SET_USE_KEEPALIVE_METHOD_NUMBER
The method number for the "setUseKeepAlive" method. |
static java.lang.String |
USE_KEEPALIVE_METHOD_NAME
The name of the method that indicates whether this client will use keep-alive in order to try to reuse a connection for multiple requests. |
static int |
USE_KEEPALIVE_METHOD_NUMBER
The method number for the "useKeepAlive" method. |
| Constructor Summary | |
HTTPClientVariable()
Creates a new variable with no name, to be used only when creating a variable with Class.newInstance(), and only when
setName() is called after that to set the name. |
|
| Method Summary | |
void |
assign(Argument argument)
Assigns the value of the provided argument to this variable. |
Variable |
executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
Executes the specified method, using the provided variables as arguments to the method, and makes the return value available to the caller. |
int |
getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the method number for the method that has the specified name and argument types, or -1 if there is no such method. |
Method[] |
getMethods()
Retrieves a list of all methods defined for this variable. |
java.lang.String |
getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the return type for the method with the specified name and argument types. |
StatTracker[] |
getStatTrackers()
Retrieves the stat trackers that have been maintained for this LDAP connection variable. |
java.lang.String |
getValueAsString()
Retrieves a string representation of the value of this argument. |
java.lang.String |
getVariableTypeName()
Retrieves the name of the variable type for this variable. |
boolean |
hasMethod(java.lang.String methodName)
Indicates whether this variable type has a method with the specified name. |
void |
startStatTrackers(JobClass jobThread)
Starts the stat trackers associated with this variable. |
void |
stopStatTrackers()
Stops the stat trackers associated with this variable. |
| Methods inherited from class com.sun.slamd.scripting.engine.Variable |
getArgumentAsString, getArgumentType, getArgumentValue, getName, isValidIdentifier, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String HTTP_CLIENT_VARIABLE_TYPE
public static final java.lang.String BLIND_TRUST_METHOD_NAME
public static final int BLIND_TRUST_METHOD_NUMBER
public static final java.lang.String CLEAR_COOKIES_METHOD_NAME
public static final int CLEAR_COOKIES_METHOD_NUMBER
public static final java.lang.String CLOSE_ALL_METHOD_NAME
public static final int CLOSE_ALL_METHOD_NUMBER
public static final java.lang.String COOKIES_ENABLED_METHOD_NAME
public static final int COOKIES_ENABLED_METHOD_NUMBER
public static final java.lang.String DISABLE_AUTHENTICATION_METHOD_NAME
public static final int DISABLE_AUTHENTICATION_METHOD_NUMBER
public static final java.lang.String DISABLE_DEBUG_MODE_METHOD_NAME
public static final int DISABLE_DEBUG_MODE_METHOD_NUMBER
public static final java.lang.String DISABLE_PROXY_METHOD_NAME
public static final int DISABLE_PROXY_METHOD_NUMBER
public static final java.lang.String DISABLE_STATISTICS_METHOD_NAME
public static final int DISABLE_STATISTICS_METHOD_NUMBER
public static final java.lang.String ENABLE_AUTHENTICATION_METHOD_NAME
public static final int ENABLE_AUTHENTICATION_METHOD_NUMBER
public static final java.lang.String ENABLE_DEBUG_MODE_METHOD_NAME
public static final int ENABLE_DEBUG_MODE_METHOD_NUMBER
public static final java.lang.String ENABLE_PROXY_METHOD_NAME
public static final int ENABLE_PROXY_1_METHOD_NUMBER
public static final int ENABLE_PROXY_2_METHOD_NUMBER
public static final java.lang.String ENABLE_STATISTICS_METHOD_NAME
public static final int ENABLE_STATISTICS_METHOD_NUMBER
public static final java.lang.String FOLLOW_REDIRECTS_METHOD_NAME
public static final int FOLLOW_REDIRECTS_METHOD_NUMBER
public static final java.lang.String GET_FAILURE_REASON_METHOD_NAME
public static final int GET_FAILURE_REASON_METHOD_NUMBER
public static final java.lang.String REMOVE_COMMON_HEADER_METHOD_NAME
public static final int REMOVE_COMMON_HEADER_METHOD_NUMBER
public static final java.lang.String RETRIEVE_ASSOCIATED_FILES_METHOD_NAME
public static final int RETRIEVE_ASSOCIATED_FILES_METHOD_NUMBER
public static final java.lang.String SEND_REQUEST_METHOD_NAME
public static final int SEND_REQUEST_1_METHOD_NUMBER
public static final int SEND_REQUEST_2_METHOD_NUMBER
public static final java.lang.String SET_BLIND_TRUST_METHOD_NAME
public static final int SET_BLIND_TRUST_METHOD_NUMBER
public static final java.lang.String SET_COMMON_HEADER_METHOD_NAME
public static final int SET_COMMON_HEADER_METHOD_NUMBER
public static final java.lang.String SET_COOKIES_ENABLED_METHOD_NAME
public static final int SET_COOKIES_ENABLED_METHOD_NUMBER
public static final java.lang.String SET_FOLLOW_REDIRECTS_METHOD_NAME
public static final int SET_FOLLOW_REDIRECTS_METHOD_NUMBER
public static final java.lang.String SET_RETRIEVE_ASSOCIATED_FILES_METHOD_NAME
public static final int SET_RETRIEVE_ASSOCIATED_FILES_METHOD_NUMBER
public static final java.lang.String SET_USE_KEEPALIVE_METHOD_NAME
public static final int SET_USE_KEEPALIVE_METHOD_NUMBER
public static final java.lang.String USE_KEEPALIVE_METHOD_NAME
public static final int USE_KEEPALIVE_METHOD_NUMBER
public static final Method[] HTTP_CLIENT_VARIABLE_METHODS
| Constructor Detail |
public HTTPClientVariable()
throws ScriptException
Class.newInstance(), and only when
setName() is called after that to set the name.
ScriptException - If a problem occurs while initializing the new
variable.| Method Detail |
public java.lang.String getVariableTypeName()
getVariableTypeName in class Variablepublic void startStatTrackers(JobClass jobThread)
startStatTrackers in class VariablejobThread - The job thread with which the stat trackers are
associated.public void stopStatTrackers()
stopStatTrackers in class Variablepublic StatTracker[] getStatTrackers()
getStatTrackers in class Variablepublic Method[] getMethods()
getMethods in class Variablepublic boolean hasMethod(java.lang.String methodName)
hasMethod in class VariablemethodName - The name of the method.
true if this variable has a method with the specified
name, or false if it does not.
public int getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
getMethodNumber in class VariablemethodName - The name of the method.argumentTypes - The list of argument types for the method.
public java.lang.String getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
getReturnTypeForMethod in class VariablemethodName - The name of the method.argumentTypes - The set of argument types for the method.
null if there is
no such method defined.
public Variable executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
throws ScriptException
executeMethod in class VariablelineNumber - The line number of the script in which the method
call occurs.methodNumber - The method number of the method to execute.arguments - The set of arguments to use for the method.
null if it
does not return a value.
ScriptException - If the specified method does not exist, or if a
problem occurs while attempting to execute it.
public void assign(Argument argument)
throws ScriptException
assign in class Variableargument - The argument whose value should be assigned to this
variable.
ScriptException - If a problem occurs while performing the
assignment.public java.lang.String getValueAsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||