|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface Tape
Represents a set of recorded HTTP interactions that can be played back or appended to.
Method Summary | |
---|---|
java.lang.String
|
getName()
@return The name of the tape. |
boolean
|
isReadable()
@return `true` if the tape is readable, `false` otherwise. |
boolean
|
isWritable()
@return `true` if the tape is writable, `false` otherwise. |
void
|
play(Response response)
Plays back a previously recorded interaction to the supplied response. |
void
|
record(Request request, Response response)
Records a new interaction to the tape. |
void
|
reset()
Resets the tape so that no recorded interaction is ready to play. |
boolean
|
seek(Request request)
Attempts to find a recorded interaction on the tape that matches the supplied request's method and URI. |
void
|
setMode(TapeMode mode)
@param mode the new record mode of the tape. |
int
|
size()
@return the number of recorded HTTP interactions currently stored on the tape. |
Method Detail |
---|
java.lang.String getName()
boolean isReadable()
boolean isWritable()
void play(Response response)
response
- the HTTP response to populate.
void record(Request request, Response response)
request
- the request to record.response
- the response to record.
void reset()
boolean seek(Request request)
request
- the HTTP request to match.
void setMode(TapeMode mode)
mode
- the new record mode of the tape.
int size()
Groovy Documentation