briansolo1985 commented on code in PR #7125:
URL: https://github.com/apache/nifi/pull/7125#discussion_r1159935815


##########
c2/c2-client-bundle/c2-client-api/src/main/java/org/apache/nifi/c2/client/api/C2Client.java:
##########
@@ -57,4 +57,14 @@ public interface C2Client {
      * @return optional error message if any issues occurred
      */
     Optional<String> uploadBundle(String callbackUrl, byte[] bundle);
+
+    /**
+     * Creates a callback URL according to proxy aware C2 settings
+     *
+     * @param absoluteUrl absolute url sent by C2 server
+     * @param relativeUrl relative url sent by C2 server
+     * @return finalised callback url
+     * @throws Exception when the callback url can not be created as per the 
current configuration and parameters
+     */
+    String getCallbackUrl(String absoluteUrl, String relativeUrl) throws 
Exception;

Review Comment:
   Moved away from using exceptions and refactored to use Optional instead



##########
c2/c2-client-bundle/c2-client-http/src/main/java/org/apache/nifi/c2/client/http/url/C2UrlProvider.java:
##########
@@ -0,0 +1,26 @@
+/*
+ * 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.nifi.c2.client.http.url;
+
+public interface C2UrlProvider {
+
+    String getHeartbeatUrl();

Review Comment:
   Sure, added



-- 
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: issues-unsubscr...@nifi.apache.org

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

Reply via email to