Class ServicePathBuilder

java.lang.Object
io.fluxcapacitor.common.ServicePathBuilder

public class ServicePathBuilder extends Object
Utility class for constructing internal service endpoint paths used to route messages to the Flux platform.

This class provides consistent path-building logic for various platform subsystems such as tracking, event sourcing, scheduling, and search. These paths are typically used by internal clients and websocket-based routing layers.

Examples

  • ServicePathBuilder.gatewayPath(COMMAND) returns "tracking/publishcommand"
  • ServicePathBuilder.searchPath() returns "search"
  • Constructor Details

    • ServicePathBuilder

      public ServicePathBuilder()
  • Method Details

    • gatewayPath

      public static String gatewayPath(MessageType messageType)
      Returns the gateway path used to publish messages of the given MessageType.

      This endpoint is used for producers of messages (e.g. commands, events, queries).

      Parameters:
      messageType - the type of message to publish
      Returns:
      a string like "tracking/publishcommand"
    • trackingPath

      public static String trackingPath(MessageType messageType)
      Returns the tracking path used to read (track) messages of the given MessageType.

      This endpoint is used by consumers of messages.

      Parameters:
      messageType - the type of message to consume
      Returns:
      a string like "tracking/readcommand"
    • eventSourcingPath

      public static String eventSourcingPath()
      Returns the service path for the event sourcing subsystem.
      Returns:
      the string "eventSourcing"
    • keyValuePath

      public static String keyValuePath()
      Returns the service path for the key-value store subsystem.

      This subsystem is largely deprecated and maintained only for backward compatibility.

      Returns:
      the string "keyValue"
    • searchPath

      public static String searchPath()
      Returns the service path for the search/document store subsystem.
      Returns:
      the string "search"
    • schedulingPath

      public static String schedulingPath()
      Returns the service path for the scheduling subsystem.
      Returns:
      the string "scheduling"