Class HttpServiceDownstreamRequestEvent

    • Constructor Detail

      • HttpServiceDownstreamRequestEvent

        public HttpServiceDownstreamRequestEvent​(java.lang.String origin,
                                                 java.lang.String service,
                                                 java.lang.String operation)
        Construct a new HttpServiceDownstreamRequestEvent
        Parameters:
        origin - the origin of the downstream call e.g. 'Web' or 'gRPC'
        service - the service name e.g. 'WeatherService'
        operation - the operation name e.g. 'getWeather'
    • Method Detail

      • withMethod

        public HttpServiceDownstreamRequestEvent withMethod​(java.lang.String method)
        Set the HTTP method in this event
        Parameters:
        method - the method e.g. GET, POST etc
        Returns:
        'this' for method chaining
      • withUri

        public HttpServiceDownstreamRequestEvent withUri​(java.lang.String uri)
        Set the URI in this event
        Parameters:
        uri - the URI
        Returns:
        'this' for method chaining
      • getMethod

        public java.lang.String getMethod()
        Get the HTTP method from the event
        Returns:
        the HTTP method
      • getUri

        public java.lang.String getUri()
        Get the URI from the event
        Returns:
        the URI
      • replaceHeader

        public boolean replaceHeader​(java.lang.String name,
                                     java.lang.String value)
        This method is deprecated. If you are authoring a Disco Event and would like to override this method, implement HeaderReplaceable instead. If you are invoking replaceHeader, you should invoke it from its implementing event class or by casting to HeaderReplaceable instead of invoking it from this class.
        Parameters:
        name - the header name
        value - the header value
        Returns:
        true if successful