All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.arthas.grpcweb.grpc.view.GrpcMessageView Maven / Gradle / Ivy

The newest version!
package com.taobao.arthas.grpcweb.grpc.view;

import io.arthas.api.ArthasServices.ResponseBody;
import com.taobao.arthas.core.command.model.MessageModel;
import com.taobao.arthas.grpcweb.grpc.observer.ArthasStreamObserver;

public class GrpcMessageView extends GrpcResultView {
    @Override
    public void draw(ArthasStreamObserver arthasStreamObserver, MessageModel result) {
        ResponseBody responseBody  = ResponseBody.newBuilder()
                .setJobId(result.getJobId())
                .setType(result.getType())
                .setStringValue(result.getMessage())
                .build();
        arthasStreamObserver.onNext(responseBody);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy