diff options
author | 2019-01-18 14:59:10 -0500 | |
---|---|---|
committer | 2019-01-18 15:00:35 -0500 | |
commit | eb0da6e53a0a693a403a14524594793915656292 (patch) | |
tree | eb77a188d4e5a29686245f6d81fd76ed56c5127e /ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main | |
parent | 1600d564c99116685fcf6c9c270cd1fbd3440a57 (diff) |
Make BluePrintProcessingService#process stream
Change-Id: I4aed859365a9c7251d8b29c0c68726d53b0f9d0f
Issue-ID: CCSDK-662
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
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.kt | 31 |
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 9af04db4..4ca0cfa9 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 |