Record Class ServerBackend

java.lang.Object
java.lang.Record
org.fhirfrog.frog.server.registry.ServerBackend
Record Components:
name - human-readable label (e.g. "sparked-au-core", "local-hapi")
conformsTo - IG canonical this backend implements (e.g. "http://hl7.org.au/fhir/core")
url - FHIR base URL for the server
managed - true if frog controls the server lifecycle (docker compose)
resetPolicy - how to reset between test runs
resetEndpoint - reset endpoint path (only when resetPolicy=ENDPOINT)
auth - authentication config; null means anonymous

public record ServerBackend(String name, String conformsTo, String url, boolean managed, ResetPolicy resetPolicy, String resetEndpoint, AuthConfig auth) extends Record
A resolved FHIR server backend that tests can execute against.

Backends are either managed (frog controls the lifecycle via Docker Compose) or external (pre-provisioned by someone else — e.g. Sparked's AU Core server). The same record models both cases; the distinction is in managed() and resetPolicy().

Multiple backends may claim the same conformsTo() canonical — this is the connectathon model: N implementations, same IG, same tests.

  • Constructor Details

    • ServerBackend

      public ServerBackend(String name, String conformsTo, String url, boolean managed, ResetPolicy resetPolicy, String resetEndpoint, AuthConfig auth)
      Creates an instance of a ServerBackend record class.
      Parameters:
      name - the value for the name record component
      conformsTo - the value for the conformsTo record component
      url - the value for the url record component
      managed - the value for the managed record component
      resetPolicy - the value for the resetPolicy record component
      resetEndpoint - the value for the resetEndpoint record component
      auth - the value for the auth record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • conformsTo

      public String conformsTo()
      Returns the value of the conformsTo record component.
      Returns:
      the value of the conformsTo record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • managed

      public boolean managed()
      Returns the value of the managed record component.
      Returns:
      the value of the managed record component
    • resetPolicy

      public ResetPolicy resetPolicy()
      Returns the value of the resetPolicy record component.
      Returns:
      the value of the resetPolicy record component
    • resetEndpoint

      public String resetEndpoint()
      Returns the value of the resetEndpoint record component.
      Returns:
      the value of the resetEndpoint record component
    • auth

      public AuthConfig auth()
      Returns the value of the auth record component.
      Returns:
      the value of the auth record component