public class Strategy extends AbstractModel
header, skipSign
Constructor and Description |
---|
Strategy() |
Strategy(Strategy source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getArg()
Get Matching parameter
There are two types of configuration parameters: unsupported parameters and supported parameters.
|
String |
getCompareFunc()
Get Logic symbol
Logical symbols are divided into the following types:
empty (content is empty)
null (do not exist)
eq (equal to)
neq (not equal to)
contains (contain)
ncontains (do not contain)
strprefix (prefix matching)
strsuffix (suffix matching)
len_eq (length equals to)
len_gt (length is greater than)
len_lt (length is less than)
ipmatch (belong to)
ipnmatch (do not belong to)
Different matching fields correspond to different logical operators.
|
String |
getContent()
Get Matching content
Currently, when the matching field is COOKIE (cookie), the matching content is not required.
|
String |
getField()
Get Matching field
Different matching fields result in different matching parameters, logical operators, and matching contents.
|
void |
setArg(String Arg)
Set Matching parameter
There are two types of configuration parameters: unsupported parameters and supported parameters.
|
void |
setCompareFunc(String CompareFunc)
Set Logic symbol
Logical symbols are divided into the following types:
empty (content is empty)
null (do not exist)
eq (equal to)
neq (not equal to)
contains (contain)
ncontains (do not contain)
strprefix (prefix matching)
strsuffix (suffix matching)
len_eq (length equals to)
len_gt (length is greater than)
len_lt (length is less than)
ipmatch (belong to)
ipnmatch (do not belong to)
Different matching fields correspond to different logical operators.
|
void |
setContent(String Content)
Set Matching content
Currently, when the matching field is COOKIE (cookie), the matching content is not required.
|
void |
setField(String Field)
Set Matching field
Different matching fields result in different matching parameters, logical operators, and matching contents.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public Strategy()
public Strategy(Strategy source)
public String getField()
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the contentwith a maximum of 512 characters. |
GET_HEADERS_NAMES (header parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. The lowercase is recommended. |
ARGS_HEADER (header parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. |
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the contentwith a maximum of 512 characters. |
GET_HEADERS_NAMES (header parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. The lowercase is recommended. |
ARGS_HEADER (header parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. |
public void setField(String Field)
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the contentwith a maximum of 512 characters. |
GET_HEADERS_NAMES (header parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. The lowercase is recommended. |
ARGS_HEADER (header parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. |
Field
- Matching field
Different matching fields result in different matching parameters, logical operators, and matching contents. The details are as follows:
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the contentwith a maximum of 512 characters. |
GET_HEADERS_NAMES (header parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. The lowercase is recommended. |
ARGS_HEADER (header parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content with a maximum of 512 characters. |
public String getCompareFunc()
public void setCompareFunc(String CompareFunc)
CompareFunc
- Logic symbol
Logical symbols are divided into the following types:
empty (content is empty)
null (do not exist)
eq (equal to)
neq (not equal to)
contains (contain)
ncontains (do not contain)
strprefix (prefix matching)
strsuffix (suffix matching)
len_eq (length equals to)
len_gt (length is greater than)
len_lt (length is less than)
ipmatch (belong to)
ipnmatch (do not belong to)
Different matching fields correspond to different logical operators. For details, see the matching field table above.
Note: This field may return null, indicating that no valid values can be obtained.public String getContent()
public void setContent(String Content)
Content
- Matching content
Currently, when the matching field is COOKIE (cookie), the matching content is not required. In other scenes, the matching content is required.
Note: This field may return null, indicating that no valid values can be obtained.public String getArg()
public void setArg(String Arg)
Arg
- Matching parameter
There are two types of configuration parameters: unsupported parameters and supported parameters.
The matching parameter can be entered only when the matching field is one of the following four. Otherwise, the parameter is not supported.
GET (GET parameter value)
POST (POST parameter value)
ARGS_COOKIE (Cookie parameter value)
ARGS_HEADER (Header parameter value)
Note: This field may return null, indicating that no valid values can be obtained.Copyright © 2024. All rights reserved.