Package com.yahoo.container.handler.test
Interface MockServiceHandler
public interface MockServiceHandler
A service handler that is able to map a request to a key and retrieve a value given a key.
- Author:
- Ulf Lilleengen
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static final class
-
Method Summary
Modifier and TypeMethodDescriptioncreateKey
(HttpRequest request) Create a custom Key given a http request.Lookup aMockServiceHandler.Value
for aMockServiceHandler.Key
.
-
Method Details
-
createKey
Create a custom Key given a http request. This will be called for each request, and allows a handler to customize its key format.- Parameters:
request
- The client http request.- Returns:
- a
MockServiceHandler.Key
used to query for the value.
-
get
Lookup aMockServiceHandler.Value
for aMockServiceHandler.Key
. Returns null if the key is not found.- Parameters:
key
- TheMockServiceHandler.Key
to look up.- Returns:
- A
MockServiceHandler.Value
used as response.
-