Record Class DispatchingContext

java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.dispatching.handling.DispatchingContext

@Internal public record DispatchingContext(Middlewares middlewares, ErrorMessageFactory errorMessageFactory, InteractionRegistry registry, TypeAdapters adapterRegistry, ExpirationStrategy expirationStrategy, DependencyInjector dependencyInjector, InteractionDefinition.ReplyConfig globalReplyConfig) extends Record
A collection of classes relevant for EventHandlers.
  • Constructor Details

    • DispatchingContext

      public DispatchingContext(Middlewares middlewares, ErrorMessageFactory errorMessageFactory, InteractionRegistry registry, TypeAdapters adapterRegistry, ExpirationStrategy expirationStrategy, DependencyInjector dependencyInjector, InteractionDefinition.ReplyConfig globalReplyConfig)
      Creates an instance of a DispatchingContext record class.
      Parameters:
      middlewares - the value for the middlewares record component
      errorMessageFactory - the value for the errorMessageFactory record component
      registry - the value for the registry record component
      adapterRegistry - the value for the adapterRegistry record component
      expirationStrategy - the value for the expirationStrategy record component
      dependencyInjector - the value for the dependencyInjector record component
      globalReplyConfig - the value for the globalReplyConfig 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. 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.
    • middlewares

      public Middlewares middlewares()
      Returns the value of the middlewares record component.
      Returns:
      the value of the middlewares record component
    • errorMessageFactory

      public ErrorMessageFactory errorMessageFactory()
      Returns the value of the errorMessageFactory record component.
      Returns:
      the value of the errorMessageFactory record component
    • registry

      public InteractionRegistry registry()
      Returns the value of the registry record component.
      Returns:
      the value of the registry record component
    • adapterRegistry

      public TypeAdapters adapterRegistry()
      Returns the value of the adapterRegistry record component.
      Returns:
      the value of the adapterRegistry record component
    • expirationStrategy

      public ExpirationStrategy expirationStrategy()
      Returns the value of the expirationStrategy record component.
      Returns:
      the value of the expirationStrategy record component
    • dependencyInjector

      public DependencyInjector dependencyInjector()
      Returns the value of the dependencyInjector record component.
      Returns:
      the value of the dependencyInjector record component
    • globalReplyConfig

      public InteractionDefinition.ReplyConfig globalReplyConfig()
      Returns the value of the globalReplyConfig record component.
      Returns:
      the value of the globalReplyConfig record component