Package org.forgerock.json.resource
Interface RequestVisitor<R,P>
- Type Parameters:
R
- The return type of this visitor's methods. UseVoid
for visitors that do not need to return results.P
- The type of the additional parameter to this visitor's methods. UseVoid
for visitors that do not need an additional parameter.
public interface RequestVisitor<R,P>
A visitor of
Request
s, in the style of the visitor design pattern.
Classes implementing this interface can perform actions based on the type of a request in a type-safe manner. When a visitor is passed to a request's accept method, the corresponding visit method associated with the type of the request is invoked.
-
Method Summary
Modifier and TypeMethodDescriptionvisitActionRequest
(P p, ActionRequest request) Visits an action request.visitCreateRequest
(P p, CreateRequest request) Visits a create request.visitDeleteRequest
(P p, DeleteRequest request) Visits a delete request.visitPatchRequest
(P p, PatchRequest request) Visits a patch request.visitQueryRequest
(P p, QueryRequest request) Visits a query request.visitReadRequest
(P p, ReadRequest request) Visits a read request.visitUpdateRequest
(P p, UpdateRequest request) Visits an update request.
-
Method Details
-
visitActionRequest
Visits an action request.- Parameters:
p
- A visitor specified parameter.request
- The action request.- Returns:
- Returns a visitor specified result.
-
visitCreateRequest
Visits a create request.- Parameters:
p
- A visitor specified parameter.request
- The create request.- Returns:
- Returns a visitor specified result.
-
visitDeleteRequest
Visits a delete request.- Parameters:
p
- A visitor specified parameter.request
- The delete request.- Returns:
- Returns a visitor specified result.
-
visitPatchRequest
Visits a patch request.- Parameters:
p
- A visitor specified parameter.request
- The patch request.- Returns:
- Returns a visitor specified result.
-
visitQueryRequest
Visits a query request.- Parameters:
p
- A visitor specified parameter.request
- The query request.- Returns:
- Returns a visitor specified result.
-
visitReadRequest
Visits a read request.- Parameters:
p
- A visitor specified parameter.request
- The read request.- Returns:
- Returns a visitor specified result.
-
visitUpdateRequest
Visits an update request.- Parameters:
p
- A visitor specified parameter.request
- The update request.- Returns:
- Returns a visitor specified result.
-