Interface ResponseHeadersProcessor

  • All Known Implementing Classes:
    ProcessStateProcessor
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ResponseHeadersProcessor
    Interface to parse data from the responses headers of a DMR response. This is not about HTTP response headers, but related to DMR responses only.

    In standalone mode there's only a single response-headers node in the DMR response, whereas in domain mode the response headers are scoped to a specific server group, host and server. The process(Header[]) method will only receive the response-headers payload w/o the surrounding 'noise'.

    Standalone Mode:

     {
         "outcome" => "success",
         "response-headers" => {
             "foo" => "bar",
             ...
         }
     }
     

    Domain Mode:

     {
         "outcome" => "success",
         "server-groups" => {
             "main-server-group" => {
                 "host" => {
                     "primary" => {
                         "server-one" => {
                             "response" => {
                                 "outcome" => "success",
                                 "response-headers" => {
                                     "foo" => "bar",
                                     ...
                                 }
                             }
                         },
                         "server-two" => {
                             "response" => {
                                 "outcome" => "success",
                                 "response-headers" => {
                                     "foo" => "bar",
                                     ...
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     
    • Method Detail

      • process

        void process​(ResponseHeadersProcessor.Header[] headers)
        Method to process the response headers. It's guaranteed that the array contains at least one element. In domain mode the array contains an element for each server group-host-server triple.