com.jayway.restassured.internal.filter
Class FilterContextImpl

java.lang.Object
  extended by com.jayway.restassured.internal.filter.FilterContextImpl
All Implemented Interfaces:
FilterContext, groovy.lang.GroovyObject

public class FilterContextImpl
extends Object
implements FilterContext, groovy.lang.GroovyObject


Constructor Summary
FilterContextImpl(String completePath, String path, Method method, Object assertionClosure, List<Filter> filterList)
           
 
Method Summary
 Object getAssertionClosure()
           
 String getCompleteRequestPath()
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperties()
           
 Object getProperty(String property)
           
 Method getRequestMethod()
           
 String getRequestPath()
           
 Object getValue(String name)
          Get a value
 Object invokeMethod(String method, Object arguments)
           
 Response next(FilterableRequestSpecification request, FilterableResponseSpecification response)
          Continue to the next filter in the chain.
 Response send(RequestSender requestSender)
          Send a request to the same request path and with the same request method as the original request.
 void setAssertionClosure(Object value)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperties(Object value)
           
 void setProperty(String property, Object value)
           
 void setValue(String name, Object value)
          Add a value that may be used be subsequent filters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterContextImpl

public FilterContextImpl(String completePath,
                         String path,
                         Method method,
                         Object assertionClosure,
                         List<Filter> filterList)
Method Detail

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject

getAssertionClosure

public Object getAssertionClosure()

setAssertionClosure

public void setAssertionClosure(Object value)

getProperties

public Object getProperties()

setProperties

public void setProperties(Object value)

next

public Response next(FilterableRequestSpecification request,
                     FilterableResponseSpecification response)
Description copied from interface: FilterContext
Continue to the next filter in the chain.

Specified by:
next in interface FilterContext
Parameters:
request - The request specification
response - The response specification
Returns:
The response of the request

getRequestPath

public String getRequestPath()
Specified by:
getRequestPath in interface FilterContext
Returns:
The request path

getRequestMethod

public Method getRequestMethod()
Specified by:
getRequestMethod in interface FilterContext
Returns:
The request method of the request (E.g. POST, GET etc)

getCompleteRequestPath

public String getCompleteRequestPath()
Specified by:
getCompleteRequestPath in interface FilterContext
Returns:
The complete request path. This is the fully-qualified path including port number and scheme.

send

public Response send(RequestSender requestSender)
Description copied from interface: FilterContext
Send a request to the same request path and with the same request method as the original request.

Specified by:
send in interface FilterContext
Parameters:
requestSender - The response or request specification.
Returns:
The response.

setValue

public void setValue(String name,
                     Object value)
Description copied from interface: FilterContext
Add a value that may be used be subsequent filters.

Specified by:
setValue in interface FilterContext
Parameters:
name - The name of the value
value - The value itself

getValue

public Object getValue(String name)
Description copied from interface: FilterContext
Get a value

Specified by:
getValue in interface FilterContext
Parameters:
name - The name of the value
Returns:
The value itself or null if no value was found for the supplied name.


Copyright © 2010-2012. All Rights Reserved.