Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.mockobjects.apache.commons.httpclient
Class MockHttpState  view MockHttpState download MockHttpState.java

java.lang.Object
  extended byorg.apache.commons.httpclient.HttpState
      extended bycom.mockobjects.apache.commons.httpclient.MockHttpState
All Implemented Interfaces:
com.mockobjects.Verifiable

public class MockHttpState
extends org.apache.commons.httpclient.HttpState
implements com.mockobjects.Verifiable


Field Summary
 
Fields inherited from class org.apache.commons.httpclient.HttpState
PREEMPTIVE_DEFAULT, PREEMPTIVE_PROPERTY
 
Constructor Summary
MockHttpState()
           
 
Method Summary
 void addCookie(org.apache.commons.httpclient.Cookie cookie)
          Adds an HTTP cookie, replacing any existing equivalent cookies.
 void addCookies(org.apache.commons.httpclient.Cookie[] cookie)
          Adds an array of HTTP cookies.
 org.apache.commons.httpclient.Cookie[] getCookies()
          Returns an array of cookies that this HTTP state currently contains.
 org.apache.commons.httpclient.Cookie[] getCookies(java.lang.String s1, int i1, java.lang.String s2, boolean b1, java.util.Date d1)
           
 org.apache.commons.httpclient.Credentials getCredentials(java.lang.String string)
           
 boolean purgeExpiredCookies()
          Removes all of cookies in this HTTP state that have expired according to the current system time.
 boolean purgeExpiredCookies(java.util.Date date)
          Removes all of cookies in this HTTP state that have expired by the specified date.
 void setCredentials(java.lang.String string, org.apache.commons.httpclient.Credentials credentials)
           
 void verify()
          Throw an AssertionFailedException if any expectations have not been met.
 
Methods inherited from class org.apache.commons.httpclient.HttpState
clear, clearCookies, clearCredentials, clearProxyCredentials, getCookiePolicy, getCookies, getCredentials, getCredentials, getProxyCredentials, getProxyCredentials, isAuthenticationPreemptive, setAuthenticationPreemptive, setCookiePolicy, setCredentials, setCredentials, setProxyCredentials, setProxyCredentials, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockHttpState

public MockHttpState()
Method Detail

addCookie

public void addCookie(org.apache.commons.httpclient.Cookie cookie)
Description copied from class: org.apache.commons.httpclient.HttpState
Adds an HTTP cookie, replacing any existing equivalent cookies. If the given cookie has already expired it will not be added, but existing values will still be removed.


addCookies

public void addCookies(org.apache.commons.httpclient.Cookie[] cookie)
Description copied from class: org.apache.commons.httpclient.HttpState
Adds an array of HTTP cookies. Cookies are added individually and in the given array order. If any of the given cookies has already expired it will not be added, but existing values will still be removed.


getCookies

public org.apache.commons.httpclient.Cookie[] getCookies()
Description copied from class: org.apache.commons.httpclient.HttpState
Returns an array of cookies that this HTTP state currently contains.


getCookies

public org.apache.commons.httpclient.Cookie[] getCookies(java.lang.String s1,
                                                         int i1,
                                                         java.lang.String s2,
                                                         boolean b1,
                                                         java.util.Date d1)

purgeExpiredCookies

public boolean purgeExpiredCookies()
Description copied from class: org.apache.commons.httpclient.HttpState
Removes all of cookies in this HTTP state that have expired according to the current system time.


purgeExpiredCookies

public boolean purgeExpiredCookies(java.util.Date date)
Description copied from class: org.apache.commons.httpclient.HttpState
Removes all of cookies in this HTTP state that have expired by the specified date.


setCredentials

public void setCredentials(java.lang.String string,
                           org.apache.commons.httpclient.Credentials credentials)

getCredentials

public org.apache.commons.httpclient.Credentials getCredentials(java.lang.String string)

verify

public void verify()
Description copied from interface: com.mockobjects.Verifiable
Throw an AssertionFailedException if any expectations have not been met.

Specified by:
verify in interface com.mockobjects.Verifiable