hokutor commented on a change in pull request #5753:
URL: https://github.com/apache/camel/pull/5753#discussion_r660051558



##########
File path: 
components/camel-huawei/camel-huaweicloud-obs/src/main/java/org/apache/camel/component/huaweicloud/obs/OBSProducer.java
##########
@@ -0,0 +1,225 @@
+/*
+ * 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.camel.component.huaweicloud.obs;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.Gson;
+import com.obs.services.ObsClient;
+import com.obs.services.exception.ObsException;
+import com.obs.services.model.CreateBucketRequest;
+import com.obs.services.model.HeaderResponse;
+import com.obs.services.model.ListBucketsRequest;
+import com.obs.services.model.ListBucketsResult;
+import com.obs.services.model.ObsBucket;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.huaweicloud.obs.constants.OBSConstants;
+import org.apache.camel.component.huaweicloud.obs.constants.OBSOperations;
+import org.apache.camel.component.huaweicloud.obs.constants.OBSProperties;
+import org.apache.camel.component.huaweicloud.obs.models.ClientConfigurations;
+import org.apache.camel.component.huaweicloud.obs.models.OBSRegion;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OBSProducer extends DefaultProducer {
+    private static final Logger LOG = 
LoggerFactory.getLogger(OBSProducer.class);
+    private OBSEndpoint endpoint;
+    private ClientConfigurations clientConfigurations;
+    private ObsClient obsClient;
+    private Gson gson;
+
+    public OBSProducer(OBSEndpoint endpoint) {
+        super(endpoint);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        this.clientConfigurations = new ClientConfigurations();

Review comment:
       Done. Initializing objects now done in doInit instead of doStart




-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to