Class ConnectorArgsBuilder

java.lang.Object
com.solace.connector.test.resources.resource.ConnectorArgsBuilder

public class ConnectorArgsBuilder extends Object
A builder class for constructing command-line arguments for micro-integration applications. This class follows the builder pattern to create a set of configuration properties that can be converted to command-line arguments in the format "--key=value".
  • Constructor Details

    • ConnectorArgsBuilder

      public ConnectorArgsBuilder()
      Creates a new empty ConnectorArgsBuilder.
    • ConnectorArgsBuilder

      public ConnectorArgsBuilder(Map<String,String> properties)
      Creates a new ConnectorArgsBuilder with the provided initial properties.
      Parameters:
      properties - Initial map of properties to use
  • Method Details

    • put

      public ConnectorArgsBuilder put(String key, String value)
      Adds a property with the given key and string value.
      Parameters:
      key - The property key
      value - The property value as a string
      Returns:
      This builder instance for method chaining
    • put

      public ConnectorArgsBuilder put(String key, Object value)
      Adds a property with the given key and object value. The object's toString() method is used to convert it to a string value.
      Parameters:
      key - The property key
      value - The property value as an object
      Returns:
      This builder instance for method chaining
    • build

      public String[] build()
      Builds the command line arguments from the properties. Each property is formatted as "--key=value".
      Returns:
      An array of command line arguments
    • deepCopy

      public ConnectorArgsBuilder deepCopy()
      Creates a deep copy of this builder with all the same properties. Modifications to the copy won't affect the original builder.
      Returns:
      A new ConnectorArgsBuilder with a copy of this builder's properties
    • workflowEnable

      public ConnectorArgsBuilder workflowEnable(int workflowId, boolean enabled)
      Configures whether a specific workflow is enabled.
      Parameters:
      workflowId - The ID of the workflow to configure
      enabled - Whether the workflow should be enabled
      Returns:
      This builder instance for method chaining
    • workflowBatchEnabled

      public ConnectorArgsBuilder workflowBatchEnabled(int workflowId, boolean batchMode)
      Configures whether batch mode is enabled for a specific workflow.
      Parameters:
      workflowId - The ID of the workflow to configure
      batchMode - Whether batch mode should be enabled
      Returns:
      This builder instance for method chaining
    • workflowBatchMaxSize

      public ConnectorArgsBuilder workflowBatchMaxSize(int workflowId, int maxSize)
      Configures the maximum batch size for a specific workflow.
      Parameters:
      workflowId - The ID of the workflow to configure
      maxSize - The maximum batch size
      Returns:
      This builder instance for method chaining
    • workflowAcknowledgmentPublishAsync

      public ConnectorArgsBuilder workflowAcknowledgmentPublishAsync(int workflowId, boolean publishAsync)
      Configures whether acknowledgment publishing is asynchronous for a specific workflow.
      Parameters:
      workflowId - The ID of the workflow to configure
      publishAsync - Whether acknowledgment publishing should be asynchronous
      Returns:
      This builder instance for method chaining
    • solaceHost

      public ConnectorArgsBuilder solaceHost(String host)
      Configures the Solace broker host.
      Parameters:
      host - The Solace host URI (e.g., "tcp://localhost:55555")
      Returns:
      This builder instance for method chaining
    • solaceClientUsername

      public ConnectorArgsBuilder solaceClientUsername(String username)
      Configures the Solace client username.
      Parameters:
      username - The username for connecting to the Solace broker
      Returns:
      This builder instance for method chaining
    • solaceClientPassword

      public ConnectorArgsBuilder solaceClientPassword(String password)
      Configures the Solace client password.
      Parameters:
      password - The password for connecting to the Solace broker
      Returns:
      This builder instance for method chaining
    • managementSessionHost

      public ConnectorArgsBuilder managementSessionHost(String host)
      Configures the host for the management session.
      Parameters:
      host - The management session host URI
      Returns:
      This builder instance for method chaining
    • managementSessionClientUsername

      public ConnectorArgsBuilder managementSessionClientUsername(String username)
      Configures the username for the management session.
      Parameters:
      username - The username for the management session
      Returns:
      This builder instance for method chaining
    • managementSessionClientPassword

      public ConnectorArgsBuilder managementSessionClientPassword(String password)
      Configures the password for the management session.
      Parameters:
      password - The password for the management session
      Returns:
      This builder instance for method chaining
    • managementQueue

      public ConnectorArgsBuilder managementQueue(String queue)
      Configures the management queue.
      Parameters:
      queue - The name of the management queue
      Returns:
      This builder instance for method chaining
    • workflowInputDestination

      public ConnectorArgsBuilder workflowInputDestination(int workflowId, String inputDestination)
      Configures the input destination for a specific workflow.
      Parameters:
      workflowId - The ID of the workflow to configure
      inputDestination - The name of the input destination
      Returns:
      This builder instance for method chaining
    • workflowOutputDestination

      public ConnectorArgsBuilder workflowOutputDestination(int workflowId, String outputDestination)
      Configures the output destination for a specific workflow.
      Parameters:
      workflowId - The ID of the workflow to configure
      outputDestination - The name of the output destination
      Returns:
      This builder instance for method chaining