Formatting Code base with ktlint
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / inbounds / selfservice-api / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / selfservice / api / BluePrintProcessingGRPCHandler.kt
index b25acd1..3054379 100644 (file)
@@ -31,16 +31,20 @@ import java.util.concurrent.Phaser
 import javax.annotation.PreDestroy
 
 @Service
-open class BluePrintProcessingGRPCHandler(private val bluePrintCoreConfiguration: BluePrintCoreConfiguration,
-                                          private val executionServiceHandler: ExecutionServiceHandler)
-    : BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
+open class BluePrintProcessingGRPCHandler(
+    private val bluePrintCoreConfiguration: BluePrintCoreConfiguration,
+    private val executionServiceHandler: ExecutionServiceHandler
+) :
+    BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
+
     private val log = LoggerFactory.getLogger(BluePrintProcessingGRPCHandler::class.java)
 
     private val ph = Phaser(1)
 
     @PreAuthorize("hasRole('USER')")
     override fun process(
-            responseObserver: StreamObserver<ExecutionServiceOutput>): StreamObserver<ExecutionServiceInput> {
+        responseObserver: StreamObserver<ExecutionServiceOutput>
+    ): StreamObserver<ExecutionServiceInput> {
 
         return object : StreamObserver<ExecutionServiceInput> {
             override fun onNext(executionServiceInput: ExecutionServiceInput) {
@@ -51,17 +55,18 @@ open class BluePrintProcessingGRPCHandler(private val bluePrintCoreConfiguration
                     }
                 } catch (e: Exception) {
                     onError(e)
-                }
-                finally {
+                } finally {
                     ph.arriveAndDeregister()
                 }
             }
 
             override fun onError(error: Throwable) {
                 log.debug("Fail to process message", error)
-                responseObserver.onError(io.grpc.Status.INTERNAL
+                responseObserver.onError(
+                    io.grpc.Status.INTERNAL
                         .withDescription(error.message)
-                        .asException())
+                        .asException()
+                )
             }
 
             override fun onCompleted() {
@@ -77,4 +82,4 @@ open class BluePrintProcessingGRPCHandler(private val bluePrintCoreConfiguration
         ph.arriveAndAwaitAdvance()
         log.info("Done waiting in $name")
     }
-}
\ No newline at end of file
+}