Class RequestInfo


  • public abstract class RequestInfo
    extends Object
    Information about a request that was received from a user.
    • Constructor Detail

      • RequestInfo

        public RequestInfo()
    • Method Detail

      • requestType

        public abstract String requestType()
        Type of the request, telling through which channel the request was coming in.

        See RequestInfo.RequestType for the types that are used by Gerrit core. Other request types are possible, e.g. if a plugin supports receiving requests through another channel.

      • redactedRequestUri

        @Memoized
        public Optional<String> redactedRequestUri()
        Redacted request URI.

        Request URI where resource IDs are replaced by '*'.

      • callingUser

        public abstract CurrentUser callingUser()
        The user that has sent the request.
      • traceContext

        public abstract com.google.gerrit.server.logging.TraceContext traceContext()
        The trace context of the request.
      • project

        public abstract Optional<Project.NameKey> project()
        The name of the project for which the request is being done. Only available if the request is tied to a project or change. If a project is available it's not guaranteed that it actually exists (e.g. if a user made a request for a project that doesn't exist).
      • formatForLogging

        @Memoized
        public String formatForLogging()