iht commented on code in PR #31906: URL: https://github.com/apache/beam/pull/31906#discussion_r1686404451
########## sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/write/properties/BasicAuthenticationProvider.java: ########## @@ -0,0 +1,92 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.beam.sdk.io.solace.write.properties; + +import com.google.auto.value.AutoValue; +import com.solacesystems.jcsmp.JCSMPProperties; + +/** + * This is a convenience class to use with basic authentication for the {@link + * org.apache.beam.sdk.io.solace.SolaceIO.Write} connector. + * + * <p>This class is used by the connector to initialize the client session. The connector calls the + * {@link #initializeSessionProperties(JCSMPProperties)} and pass that object (with some additions) + * to the broker to create a session. + * + * <p>In this case, the properties that are set are those related to the authentication and the host + * details where the broker is located. The host should include the full host and port details, if + * the port used is not the default (55555). + * + * <p>Example of how to create the provider object: + * + * <pre>{@code + * BasicAuthenticationProvider propsFactory = + * BasicAuthenticationProvider.builder() + * .username("username") + * .password("password") + * .host("host:port") + * .build(); + * }</pre> + */ +@AutoValue +public abstract class BasicAuthenticationProvider extends SessionPropertiesProvider { Review Comment: I have just pushed a new commit reusing the same factories for the write and read connectors. Please take a look and resolve the conversation if the new commit fixes this. Thanks for reviewing the PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
