Interface LocalHandlerInput

All Known Implementing Classes:
LocalExecution

public interface LocalHandlerInput
Gives Fluxzero handling extensions access to a local invocation whose full message is created only when needed.

This is an infrastructure interface. Applications normally receive the payload, metadata, user, or message as handler parameters and do not implement or invoke this interface directly.

  • Method Details

    • getMessageType

      io.fluxzero.common.MessageType getMessageType()
      Returns the type of message being handled.
      Returns:
      the current message type
    • getUser

      User getUser(UserProvider provider)
      Returns the user selected for this local dispatch.
      Parameters:
      provider - the configured provider whose user is requested
      Returns:
      the resolved user, or null if the dispatch has no user
    • hasResolvedUser

      boolean hasResolvedUser()
      Returns whether user resolution has already completed for this input.
      Returns:
      true when getUser(UserProvider) can be used without materializing the message
    • getMetadata

      io.fluxzero.common.api.Metadata getMetadata()
      Returns the local message metadata, computing deferred metadata changes when necessary.
      Returns:
      the current metadata
    • containsMetadata

      boolean containsMetadata(String key)
      Tests already available metadata without forcing deferred metadata creation.
      Parameters:
      key - the metadata key to look up
      Returns:
      true if already available metadata contains the key
    • getIndex

      Long getIndex()
      Returns the message index when the local input represents a stored message.
      Returns:
      the message index, or null for a newly dispatched local message
    • invoke

      Object invoke(io.fluxzero.common.handling.HandlerMethodPlan<DeserializingMessage> plan)
      Invokes a prepared handler plan while installing the required local handling context.
      Parameters:
      plan - the handler plan to invoke
      Returns:
      the handler result
    • getPayload

      Object getPayload()
    • getMessage

      DeserializingMessage getMessage()
    • getMessageIfAvailable

      default DeserializingMessage getMessageIfAvailable()