package com.atlassian.bitbucket.mesh.git;

import com.atlassian.bitbucket.mesh.process.OsProcess;
import com.atlassian.bitbucket.mesh.rpc.v1.RpcStreamChunk;

import javax.annotation.Nonnull;

interface RpcResponseFragmentFactory<RespT> {

    @Nonnull
    RespT createResultFragment(int exitCode);

    @Nonnull
    RespT createStartFragment(@Nonnull OsProcess process);

    @Nonnull
    RespT createStderrFragment(@Nonnull RpcStreamChunk stderr);

    @Nonnull
    RespT createStdoutFragment(@Nonnull RpcStreamChunk stdout);
}
