Interface RequestVisitor<R,P>

Type Parameters:
R - The return type of this visitor's methods. Use Void for visitors that do not need to return results.
P - The type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter.

public interface RequestVisitor<R,P>
A visitor of Requests, 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 Details

    • visitActionRequest

      R visitActionRequest(P p, ActionRequest request)
      Visits an action request.
      Parameters:
      p - A visitor specified parameter.
      request - The action request.
      Returns:
      Returns a visitor specified result.
    • visitCreateRequest

      R visitCreateRequest(P p, CreateRequest request)
      Visits a create request.
      Parameters:
      p - A visitor specified parameter.
      request - The create request.
      Returns:
      Returns a visitor specified result.
    • visitDeleteRequest

      R visitDeleteRequest(P p, DeleteRequest request)
      Visits a delete request.
      Parameters:
      p - A visitor specified parameter.
      request - The delete request.
      Returns:
      Returns a visitor specified result.
    • visitPatchRequest

      R visitPatchRequest(P p, PatchRequest request)
      Visits a patch request.
      Parameters:
      p - A visitor specified parameter.
      request - The patch request.
      Returns:
      Returns a visitor specified result.
    • visitQueryRequest

      R visitQueryRequest(P p, QueryRequest request)
      Visits a query request.
      Parameters:
      p - A visitor specified parameter.
      request - The query request.
      Returns:
      Returns a visitor specified result.
    • visitReadRequest

      R visitReadRequest(P p, ReadRequest request)
      Visits a read request.
      Parameters:
      p - A visitor specified parameter.
      request - The read request.
      Returns:
      Returns a visitor specified result.
    • visitUpdateRequest

      R visitUpdateRequest(P p, UpdateRequest request)
      Visits an update request.
      Parameters:
      p - A visitor specified parameter.
      request - The update request.
      Returns:
      Returns a visitor specified result.