package eu.teraflow.tid.bgp4Peer.grpc;

import io.grpc.stub.StreamObserver;
import src.main.proto.GrpcService.updateRequest;
import src.main.proto.GrpcService.updateResponse;
import src.main.proto.updateServiceGrpc.updateServiceImplBase;


public class updateServiceImpl extends updateServiceImplBase{

public void update(updateRequest request, StreamObserver<updateResponse> responseObserver) {
		
		System.out.println(request);
		
		updateResponse response = updateResponse.newBuilder()
			      .setAck("Update procesado, " + request )
			      .build();
		
		 // Use responseObserver to send a single response back
	    responseObserver.onNext(response);


	    // When you are done, you must call onCompleted.
	    responseObserver.onCompleted();
	    
	}

}
