Class ConnectorArgsBuilder
java.lang.Object
com.solace.connector.test.resources.resource.ConnectorArgsBuilder
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 Summary
ConstructorsConstructorDescriptionCreates a new empty ConnectorArgsBuilder.ConnectorArgsBuilder(Map<String, String> properties) Creates a new ConnectorArgsBuilder with the provided initial properties. -
Method Summary
Modifier and TypeMethodDescriptionString[]build()Builds the command line arguments from the properties.deepCopy()Creates a deep copy of this builder with all the same properties.managementQueue(String queue) Configures the management queue.managementSessionClientPassword(String password) Configures the password for the management session.managementSessionClientUsername(String username) Configures the username for the management session.managementSessionHost(String host) Configures the host for the management session.Adds a property with the given key and object value.Adds a property with the given key and string value.solaceClientPassword(String password) Configures the Solace client password.solaceClientUsername(String username) Configures the Solace client username.solaceHost(String host) Configures the Solace broker host.workflowAcknowledgmentPublishAsync(int workflowId, boolean publishAsync) Configures whether acknowledgment publishing is asynchronous for a specific workflow.workflowBatchEnabled(int workflowId, boolean batchMode) Configures whether batch mode is enabled for a specific workflow.workflowBatchMaxSize(int workflowId, int maxSize) Configures the maximum batch size for a specific workflow.workflowEnable(int workflowId, boolean enabled) Configures whether a specific workflow is enabled.workflowInputDestination(int workflowId, String inputDestination) Configures the input destination for a specific workflow.workflowOutputDestination(int workflowId, String outputDestination) Configures the output destination for a specific workflow.
-
Constructor Details
-
ConnectorArgsBuilder
public ConnectorArgsBuilder()Creates a new empty ConnectorArgsBuilder. -
ConnectorArgsBuilder
Creates a new ConnectorArgsBuilder with the provided initial properties.- Parameters:
properties- Initial map of properties to use
-
-
Method Details
-
put
Adds a property with the given key and string value.- Parameters:
key- The property keyvalue- The property value as a string- Returns:
- This builder instance for method chaining
-
put
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 keyvalue- The property value as an object- Returns:
- This builder instance for method chaining
-
build
Builds the command line arguments from the properties. Each property is formatted as "--key=value".- Returns:
- An array of command line arguments
-
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
Configures whether a specific workflow is enabled.- Parameters:
workflowId- The ID of the workflow to configureenabled- Whether the workflow should be enabled- Returns:
- This builder instance for method chaining
-
workflowBatchEnabled
Configures whether batch mode is enabled for a specific workflow.- Parameters:
workflowId- The ID of the workflow to configurebatchMode- Whether batch mode should be enabled- Returns:
- This builder instance for method chaining
-
workflowBatchMaxSize
Configures the maximum batch size for a specific workflow.- Parameters:
workflowId- The ID of the workflow to configuremaxSize- 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 configurepublishAsync- Whether acknowledgment publishing should be asynchronous- Returns:
- This builder instance for method chaining
-
solaceHost
Configures the Solace broker host.- Parameters:
host- The Solace host URI (e.g., "tcp://localhost:55555")- Returns:
- This builder instance for method chaining
-
solaceClientUsername
Configures the Solace client username.- Parameters:
username- The username for connecting to the Solace broker- Returns:
- This builder instance for method chaining
-
solaceClientPassword
Configures the Solace client password.- Parameters:
password- The password for connecting to the Solace broker- Returns:
- This builder instance for method chaining
-
managementSessionHost
Configures the host for the management session.- Parameters:
host- The management session host URI- Returns:
- This builder instance for method chaining
-
managementSessionClientUsername
Configures the username for the management session.- Parameters:
username- The username for the management session- Returns:
- This builder instance for method chaining
-
managementSessionClientPassword
Configures the password for the management session.- Parameters:
password- The password for the management session- Returns:
- This builder instance for method chaining
-
managementQueue
Configures the management queue.- Parameters:
queue- The name of the management queue- Returns:
- This builder instance for method chaining
-
workflowInputDestination
Configures the input destination for a specific workflow.- Parameters:
workflowId- The ID of the workflow to configureinputDestination- The name of the input destination- Returns:
- This builder instance for method chaining
-
workflowOutputDestination
Configures the output destination for a specific workflow.- Parameters:
workflowId- The ID of the workflow to configureoutputDestination- The name of the output destination- Returns:
- This builder instance for method chaining
-