aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-01-19 01:04:58 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-19 01:04:58 +0000
commita651a74ef5d0be67855b367f1569bdc1521bbedd (patch)
treee0900152177893142eb7cf1dbf105b5ff3784085 /ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main
parent9bca95cd2d6653a19e53b66d231b360590f8e366 (diff)
parent495cab294826a2d3f6ad760ddbba3b007c810367 (diff)
Merge "Make BluePrintProcessingService#process stream"
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt31
1 files changed, 22 insertions, 9 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
index 9af04db4b..4ca0cfa92 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
@@ -30,14 +30,27 @@ class BluePrintProcessingGRPCHandler(private val bluePrintCoreConfiguration: Blu
: BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
private val log = LoggerFactory.getLogger(BluePrintProcessingGRPCHandler::class.java)
- override fun process(request: ExecutionServiceInput,
- responseObserver: StreamObserver<ExecutionServiceOutput>) {
-
- //val json = JsonFormat.printer().print(request)
- //log.info("Received GRPC request ${json}")
- //TODO( Handle Processing Response")
- val response = ExecutionServiceOutput.newBuilder().setCommonHeader(request.commonHeader).build()
- responseObserver.onNext(response)
- responseObserver.onCompleted()
+
+ override fun process(responseObserver: StreamObserver<ExecutionServiceOutput>?): StreamObserver<ExecutionServiceInput> {
+
+ return object : StreamObserver<ExecutionServiceInput> {
+
+ override fun onNext(executionServiceInput: ExecutionServiceInput) {
+ TODO("Handle Processing Response")
+// executionServiceHandler.process(executionServiceInput)
+// responseObserver.onNext(executionServiceOuput)
+ }
+
+ override fun onError(error: Throwable) {
+ log.warn("Fail to process message", error)
+ }
+
+ override fun onCompleted() {
+ responseObserver?.onCompleted()
+ }
+ }
+
}
+
+
} \ No newline at end of file