Class AbstractRequestVisitor<R,​P,​E extends Exception>

  • 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.
    E - The type of the exception thrown by the visitor method if it fails, or NeverThrowsException if the visitor cannot fail.
    All Implemented Interfaces:
    RequestVisitor<R,​P,​E>
    Direct Known Subclasses:
    ChangeRecordVisitor

    public abstract class AbstractRequestVisitor<R,​P,​E extends Exception>
    extends Object
    implements RequestVisitor<R,​P,​E>
    Abstract class that implements the RequestVisitor interface.

    All the implemented methods forward calls to the overridable method visitAnyRequest(Object, Request) which only returns null.

    • Constructor Detail

      • AbstractRequestVisitor

        public AbstractRequestVisitor()
    • Method Detail

      • visitRequest

        public R visitRequest​(P p,
                              AddRequest request)
                       throws E extends Exception
        Description copied from interface: RequestVisitor
        Visits an Add request.
        Specified by:
        visitRequest in interface RequestVisitor<R,​P,​E extends Exception>
        Parameters:
        p - A visitor specified parameter.
        request - The Add request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception
      • visitRequest

        public R visitRequest​(P p,
                              BindRequest request)
                       throws E extends Exception
        Description copied from interface: RequestVisitor
        Visits an Bind request.
        Specified by:
        visitRequest in interface RequestVisitor<R,​P,​E extends Exception>
        Parameters:
        p - A visitor specified parameter.
        request - The Bind request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception
      • visitRequest

        public R visitRequest​(P p,
                              DeleteRequest request)
                       throws E extends Exception
        Description copied from interface: RequestVisitor
        Visits an Delete request.
        Specified by:
        visitRequest in interface RequestVisitor<R,​P,​E extends Exception>
        Parameters:
        p - A visitor specified parameter.
        request - The Delete request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception
      • visitRequest

        public R visitRequest​(P p,
                              ModifyRequest request)
                       throws E extends Exception
        Description copied from interface: RequestVisitor
        Visits an Modify request.
        Specified by:
        visitRequest in interface RequestVisitor<R,​P,​E extends Exception>
        Parameters:
        p - A visitor specified parameter.
        request - The Modify request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception
      • visitRequest

        public R visitRequest​(P p,
                              SearchRequest request)
                       throws E extends Exception
        Description copied from interface: RequestVisitor
        Visits an Search request.
        Specified by:
        visitRequest in interface RequestVisitor<R,​P,​E extends Exception>
        Parameters:
        p - A visitor specified parameter.
        request - The Search request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception
      • visitRequest

        public R visitRequest​(P p,
                              UnbindRequest request)
                       throws E extends Exception
        Description copied from interface: RequestVisitor
        Visits an Unbind request.
        Specified by:
        visitRequest in interface RequestVisitor<R,​P,​E extends Exception>
        Parameters:
        p - A visitor specified parameter.
        request - The Unbind request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception
      • visitAnyRequest

        protected R visitAnyRequest​(P p,
                                    Request request)
                             throws E extends Exception
        Catch-all method visiting any request for which the visit method has not been overridden.

        Default behavior is to return null.

        Parameters:
        p - A visitor specified parameter.
        request - A request.
        Returns:
        Returns a visitor specified result.
        Throws:
        E - If the visitor failed.
        E extends Exception