Record Class RuntimeConfiguration

java.lang.Object
java.lang.Record
org.j7m.middleware.core.RuntimeConfiguration
Record Components:
identity - runtime identity
registry - registry client owned by the runtime
codec - value codec
transports - transport providers owned by the runtime
clock - runtime clock
security - security configuration

public record RuntimeConfiguration(org.j7m.middleware.api.RuntimeIdentity identity, org.j7m.middleware.registry.api.RegistryClient registry, org.j7m.middleware.codec.api.ValueCodec codec, List<org.j7m.middleware.transport.api.TransportProvider> transports, Clock clock, org.j7m.middleware.security.api.SecurityConfiguration security) extends Record
Immutable construction configuration for DefaultMiddlewareRuntime.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RuntimeConfiguration(org.j7m.middleware.api.RuntimeIdentity identity, org.j7m.middleware.registry.api.RegistryClient registry, org.j7m.middleware.codec.api.ValueCodec codec, List<org.j7m.middleware.transport.api.TransportProvider> transports, Clock clock, org.j7m.middleware.security.api.SecurityConfiguration security)
    Creates immutable configuration fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the clock record component.
    org.j7m.middleware.codec.api.ValueCodec
    Returns the value of the codec record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.j7m.middleware.api.RuntimeIdentity
    Returns the value of the identity record component.
    static org.j7m.middleware.api.RuntimeIdentity
    identity(String runtimeId)
    Creates an identity with generated metadata.
    org.j7m.middleware.registry.api.RegistryClient
    Returns the value of the registry record component.
    org.j7m.middleware.security.api.SecurityConfiguration
    Returns the value of the security record component.
    final String
    Returns a string representation of this record class.
    List<org.j7m.middleware.transport.api.TransportProvider>
    Returns the value of the transports record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RuntimeConfiguration

      public RuntimeConfiguration(org.j7m.middleware.api.RuntimeIdentity identity, org.j7m.middleware.registry.api.RegistryClient registry, org.j7m.middleware.codec.api.ValueCodec codec, List<org.j7m.middleware.transport.api.TransportProvider> transports, Clock clock, org.j7m.middleware.security.api.SecurityConfiguration security)
      Creates immutable configuration fields.
  • Method Details

    • identity

      public static org.j7m.middleware.api.RuntimeIdentity identity(String runtimeId)
      Creates an identity with generated metadata.
      Parameters:
      runtimeId - runtime identifier
      Returns:
      runtime identity
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • identity

      public org.j7m.middleware.api.RuntimeIdentity identity()
      Returns the value of the identity record component.
      Returns:
      the value of the identity record component
    • registry

      public org.j7m.middleware.registry.api.RegistryClient registry()
      Returns the value of the registry record component.
      Returns:
      the value of the registry record component
    • codec

      public org.j7m.middleware.codec.api.ValueCodec codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component
    • transports

      public List<org.j7m.middleware.transport.api.TransportProvider> transports()
      Returns the value of the transports record component.
      Returns:
      the value of the transports record component
    • clock

      public Clock clock()
      Returns the value of the clock record component.
      Returns:
      the value of the clock record component
    • security

      public org.j7m.middleware.security.api.SecurityConfiguration security()
      Returns the value of the security record component.
      Returns:
      the value of the security record component