Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jmeter.protocol.http.control
Class Cookie

    java.lang.Object
      org.apache.jmeter.testelement.AbstractTestElement
          org.apache.jmeter.protocol.http.control.Cookie

All Implemented Interfaces:
  Cloneable, Serializable, TestElement

public class Cookie
extends AbstractTestElement
implements Serializable

This class is a Cookie encapsulator.

See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.apache.jmeter.testelement.TestElement
`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

Constructor Summary
`Cookie()` create the coookie
`Cookie(String name, String value, String domain, String path, boolean secure, long expires)` create the coookie
`Cookie(String name, String value, String domain, String path, boolean secure, long expires, boolean hasPath, boolean hasDomain)` create the coookie
`Cookie(String name, String value, String domain, String path, boolean secure, long expires, boolean hasPath, boolean hasDomain, int version)` Create a JMeter Cookie.

Method Summary
`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

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
`addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Cookie

    public Cookie()

  create the coookie

### Cookie

    public Cookie(String name,
                  String value,
                  String domain,
                  String path,
                  boolean secure,
                  long expires)

  create the coookie

Parameters:
  `expires` - - this is in seconds

### Cookie

    public Cookie(String name,
                  String value,
                  String domain,
                  String path,
                  boolean secure,
                  long expires,
                  boolean hasPath,
                  boolean hasDomain)

  create the coookie

Parameters:
  `expires` - - this is in seconds
  `hasPath` - - was the path explicitly specified?
  `hasDomain` - - was the domain explicitly specified?

### Cookie

    public Cookie(String name,
                  String value,
                  String domain,
                  String path,
                  boolean secure,
                  long expires,
                  boolean hasPath,
                  boolean hasDomain,
                  int version)

  Create a JMeter Cookie.

Parameters:
  `name` -
  `value` -
  `domain` -
  `path` -
  `secure` -
  `expires` - - this is in seconds
  `hasPath` - - was the path explicitly specified?
  `hasDomain` - - was the domain explicitly specified?
  `version` - - cookie spec. version

Method Detail

### addConfigElement

    public void addConfigElement(ConfigElement config)

### getValue

    public String getValue()

  get the value for this object.

### setValue

    public void setValue(String value)

  set the value for this object.

### getDomain

    public String getDomain()

  get the domain for this object.

### setDomain

    public void setDomain(String domain)

  set the domain for this object.

### getExpires

    public long getExpires()

  get the expiry time for the cookie

  Returns:
    Expiry time in seconds since the Java epoch

### getExpiresMillis

    public long getExpiresMillis()

  get the expiry time for the cookie

  Returns:
    Expiry time in milli-seconds since the Java epoch, i.e. same as System.currentTimeMillis()

### setExpires

    public void setExpires(long expires)

  set the expiry time for the cookie

  Parameters:
    `expires` - - expiry time in seconds since the Java epoch

### getSecure

    public boolean getSecure()

  get the secure for this object.

### setSecure

    public void setSecure(boolean secure)

  set the secure for this object.

### getPath

    public String getPath()

  get the path for this object.

### setPath

    public void setPath(String path)

  set the path for this object.

### setPathSpecified

    public void setPathSpecified(boolean b)

### isPathSpecified

    public boolean isPathSpecified()

### setDomainSpecified

    public void setDomainSpecified(boolean b)

### isDomainSpecified

    public boolean isDomainSpecified()

### toString

    public String toString()

  creates a string representation of this cookie

### getVersion

    public int getVersion()

  Returns:
    the version

### setVersion

    public void setVersion(int version)

  Parameters:
    `version` - the version to set

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.