Renaming Files having BluePrint to have Blueprint
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / services / execution-service / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / services / execution / StreamingRemoteExecutionService.kt
index fc37b48..dadf72e 100644 (file)
@@ -29,12 +29,12 @@ import kotlinx.coroutines.flow.consumeAsFlow
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.withTimeout
 import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
 import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
 import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
@@ -58,7 +58,7 @@ interface StreamingRemoteExecutionService<ReqT, ResT> {
     prefix = "blueprintsprocessor.streamingRemoteExecution", name = ["enabled"],
     havingValue = "true", matchIfMissing = false
 )
-class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService) :
+class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService) :
     StreamingRemoteExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
 
     private val log = logger(StreamingRemoteExecutionServiceImpl::class)
@@ -84,12 +84,12 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
             val grpcChannel = grpcChannel(selector)
 
             /** Get Send and Receive Channel for bidirectional process method*/
-            val channels = clientCallBidiStreaming(BluePrintProcessingServiceGrpc.getProcessMethod(), grpcChannel)
+            val channels = clientCallBidiStreaming(BlueprintProcessingServiceGrpc.getProcessMethod(), grpcChannel)
             commChannels[txId] = channels
         }
 
         val commChannel = commChannels[txId]
-            ?: throw BluePrintException("failed to create response subscription for transactionId($txId) channel")
+            ?: throw BlueprintException("failed to create response subscription for transactionId($txId) channel")
 
         log.info("created subscription for transactionId($txId)")
 
@@ -102,7 +102,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
      */
     override suspend fun send(txId: String, input: ExecutionServiceInput) {
         val sendChannel = commChannels[txId]?.requestChannel
-            ?: throw BluePrintException("failed to get transactionId($txId) send channel")
+            ?: throw BlueprintException("failed to get transactionId($txId) send channel")
         coroutineScope {
             launch {
                 sendChannel.send(input)
@@ -127,7 +127,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
 
             /** Send the request */
             val sendChannel = commChannels[txId]?.requestChannel
-                ?: throw BluePrintException("failed to get transactionId($txId) send channel")
+                ?: throw BlueprintException("failed to get transactionId($txId) send channel")
             sendChannel.send(input)
 
             /** Receive the response with timeout */
@@ -186,7 +186,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
     }
 
     suspend fun createGrpcChannel(grpcProperties: GrpcClientProperties): ManagedChannel {
-        val grpcClientService: BluePrintGrpcClientService = bluePrintGrpcLibPropertyService
+        val grpcClientService: BlueprintGrpcClientService = bluePrintGrpcLibPropertyService
             .blueprintGrpcClientService(grpcProperties)
         return grpcClientService.channel()
     }
@@ -203,7 +203,7 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe
                 selector
             }
             else -> {
-                throw BluePrintException("couldn't process selector($selector)")
+                throw BlueprintException("couldn't process selector($selector)")
             }
         }
     }