org.stjs.testing.jquery
Class MockjaxOptions

java.lang.Object
  extended by org.stjs.testing.jquery.MockjaxOptions

public class MockjaxOptions
extends Object


Field Summary
 boolean async
           
 String contentType
          A string which specifies the content type for the response.
 Object data
          In addition to the URL, match parameters.
 String etag
          A string specifying a unique identifier referencing a specific version of the requested data.
 Map<String,? extends Object> headers
          An object literal whos keys will be simulated as additional headers returned from the server for the request.
 boolean isTimeout
          A boolean value that determines whether or not the mock will force a timeout on the request.
 Date lastModified
          A date string specifying the mocked last-modified time for the request.
 String proxy
          A string specifying a path to a file, from which the contents will be returned for the request.
 Callback1<Map<String,Object>> response
          function(settings) {}, A function that allows for the dynamic setting of responseText/responseXML upon each request.
 Object responseText
          A string specifying the mocked text, or a mocked object literal, for the request.
 long responseTime
          An integer that specifies a simulated network and server latency (in milliseconds).
 String responseXML
          A string specifying the mocked XML for the request.
 int status
          An integer that specifies a valid server response code.
 String type
          Specify what HTTP method to match, usually GET or POST.
 String url
          A string or regular expression specifying the url of the request that the data should be mocked for.
 
Constructor Summary
MockjaxOptions()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

public String url
A string or regular expression specifying the url of the request that the data should be mocked for. If the url is a string and contains an asterisk ( * ), it is treated as a wildcard, by translating to a regular expression, replacing the asterisk with .+.


data

public Object data
In addition to the URL, match parameters.


type

public String type
Specify what HTTP method to match, usually GET or POST. Case-insensitive, so get and post also work.


headers

public Map<String,? extends Object> headers
An object literal whos keys will be simulated as additional headers returned from the server for the request.


status

public int status
An integer that specifies a valid server response code. This simulates a server response code.


responseTime

public long responseTime
An integer that specifies a simulated network and server latency (in milliseconds).


isTimeout

public boolean isTimeout
A boolean value that determines whether or not the mock will force a timeout on the request.


contentType

public String contentType
A string which specifies the content type for the response.


response

public Callback1<Map<String,Object>> response
function(settings) {}, A function that allows for the dynamic setting of responseText/responseXML upon each request.


responseText

public Object responseText
A string specifying the mocked text, or a mocked object literal, for the request.


responseXML

public String responseXML
A string specifying the mocked XML for the request.


proxy

public String proxy
A string specifying a path to a file, from which the contents will be returned for the request.


lastModified

public Date lastModified
A date string specifying the mocked last-modified time for the request. This is used by $.ajax to determine if the requested data is new since the last request.


etag

public String etag
A string specifying a unique identifier referencing a specific version of the requested data. This is used by $.ajax to determine if the requested data is new since the last request. (see HTTP_ETag)


async

public boolean async
Constructor Detail

MockjaxOptions

public MockjaxOptions()


Copyright © 2012. All Rights Reserved.