public class Cookie extends AbstractTestElement implements Serializable
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
Cookie()
create the cookie
|
Cookie(String name,
String value,
String domain,
String path,
boolean secure,
long expires)
create the cookie
|
Cookie(String name,
String value,
String domain,
String path,
boolean secure,
long expires,
boolean hasPath,
boolean hasDomain)
create the cookie
|
Cookie(String name,
String value,
String domain,
String path,
boolean secure,
long expires,
boolean hasPath,
boolean hasDomain,
int version)
Create a JMeter Cookie.
|
Modifier and Type | Method and Description |
---|---|
void |
addConfigElement(ConfigElement config) |
String |
getDomain()
get the domain for this object.
|
long |
getExpires()
get the expiry time for the cookie
|
long |
getExpiresMillis()
get the expiry time for the cookie
|
String |
getPath()
get the path for this object.
|
boolean |
getSecure()
get the secure for this object.
|
String |
getValue()
get the value for this object.
|
int |
getVersion() |
boolean |
isDomainSpecified() |
boolean |
isPathSpecified() |
void |
setDomain(String domain)
set the domain for this object.
|
void |
setDomainSpecified(boolean b) |
void |
setExpires(long expires)
set the expiry time for the cookie
|
void |
setPath(String path)
set the path for this object.
|
void |
setPathSpecified(boolean b) |
void |
setSecure(boolean secure)
set the secure for this object.
|
void |
setValue(String value)
set the value for this object.
|
void |
setVersion(int version) |
String |
toString()
creates a string representation of this cookie
|
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, wait, wait, wait
removed
public Cookie()
public Cookie(String name, String value, String domain, String path, boolean secure, long expires)
name
- name of the cookievalue
- value of the cookiedomain
- domain for which the cookie is validpath
- path for which the cookie is validsecure
- flag whether cookie is to be handled as 'secure'expires
- - this is in secondspublic Cookie(String name, String value, String domain, String path, boolean secure, long expires, boolean hasPath, boolean hasDomain)
name
- name of the cookievalue
- value of the cookiedomain
- domain for which the cookie is validpath
- path for which the cookie is validsecure
- flag whether cookie is to be handled as 'secure'expires
- - this is in secondshasPath
- - was the path explicitly specified?hasDomain
- - was the domain explicitly specified?public Cookie(String name, String value, String domain, String path, boolean secure, long expires, boolean hasPath, boolean hasDomain, int version)
name
- name of the cookievalue
- value of the cookiedomain
- domain for which the cookie is validpath
- path for which the cookie is validsecure
- flag whether cookie is to be handled as 'secure'expires
- - this is in secondshasPath
- - was the path explicitly specified?hasDomain
- - was the domain explicitly specified?version
- - cookie spec. versionpublic void addConfigElement(ConfigElement config)
public String getValue()
public void setValue(String value)
value
- the value of this cookiepublic String getDomain()
public void setDomain(String domain)
domain
- the domain for which this cookie is validpublic long getExpires()
public long getExpiresMillis()
public void setExpires(long expires)
expires
- - expiry time in seconds since the Java epochpublic boolean getSecure()
public void setSecure(boolean secure)
secure
- flag whether this cookie should be treated as a 'secure' cookiepublic String getPath()
public void setPath(String path)
path
- the path for which this cookie is validpublic void setPathSpecified(boolean b)
public boolean isPathSpecified()
public void setDomainSpecified(boolean b)
public boolean isDomainSpecified()
public String toString()
public int getVersion()
public void setVersion(int version)
version
- the version to setCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.