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

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

There is a newer version: 4.0.3
Show newest version
package com.taobao.arthas.grpcweb.grpc.view;

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

/**
 * @author xuyang 2023/8/15
 */
public class GrpcPwdView extends GrpcResultView {


    @Override
    public void draw(ArthasStreamObserver arthasStreamObserver, PwdModel result) {
        StringStringMapValue stringStringMapValue = StringStringMapValue.newBuilder()
                .putStringStringMap("workingDir", result.getWorkingDir()).build();
        ResponseBody responseBody  = ResponseBody.newBuilder()
                .setJobId(result.getJobId())
                .setType(result.getType())
                .setStringStringMapValue(stringStringMapValue)
                .build();
        arthasStreamObserver.onNext(responseBody);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy