Interface JRTClientConfigRequest

All Superinterfaces:
JRTConfigRequest
All Known Implementing Classes:
JRTClientConfigRequestV3

public interface JRTClientConfigRequest extends JRTConfigRequest
Interface for config requests used by clients.
Author:
Ulf Lilleengen
  • Method Details

    • validateResponse

      boolean validateResponse()
      Validate config response given by the server. If none is given, or an error occurred, this should return false.
      Returns:
      true if valid response, false if not.
    • hasUpdatedGeneration

      boolean hasUpdatedGeneration()
      Test whether ot not the returned config has an updated generation. This should return false if no response have been given.
      Returns:
      true if generation is updated, false if not.
    • getNewPayload

      Payload getNewPayload()
      Return the payload in the response given by the server. The payload will be empty if no response was given.
      Returns:
      the config payload.
    • nextRequest

      JRTClientConfigRequest nextRequest(long timeout)
      Create a new JRTClientConfigRequest based on this request based on the same request parameters, but having the timeout changed.
      Parameters:
      timeout - server timeout of the new request.
      Returns:
      a new JRTClientConfigRequest instance.
    • isError

      boolean isError()
      Test whether or not the returned request is an error.
      Returns:
      true if error, false if not.
    • getNewGeneration

      long getNewGeneration()
      Get the generation of the newly provided config. If none has been given, 0 should be returned.
      Returns:
      the new generation.
    • responseIsApplyOnRestart

      boolean responseIsApplyOnRestart()
      Returns true if this config should only be applied at the last restart, false if it should be applied immediately
    • getNewChecksums

      PayloadChecksums getNewChecksums()
      Gets the config checksums of the config returned by the server. Returns an empty string if no response has been returned.
      Returns:
      a config checksum.
    • hasUpdatedConfig

      boolean hasUpdatedConfig()
      Test whether or not the response contains an updated config or not. False if no response has been returned.
      Returns:
      true if config is updated, false if not.
    • getResponseTrace

      Trace getResponseTrace()
      Get the Trace given in the response by the server. The Trace can be used to add further tracing and later printed to provide useful debug info.
      Returns:
      a Trace.
    • getDefContent

      DefContent getDefContent()
      Get config definition content.
      Returns:
      def as lines.