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

com.taobao.hsf.invocation.RPCResult Maven / Gradle / Ivy

There is a newer version: 1.8.3
Show newest version
package com.taobao.hsf.invocation;

import com.taobao.hsf.domain.HSFResponse;

/**
 * Created by ifree613 on 2017/8/11.
 */
public class RPCResult {
    //TODO isolate hsfresponse
    private HSFResponse hsfResponse;

    private ResponseContext responseContext = new ResponseContext();

    private InvocationType invocationType = InvocationType.BIZ;

    public InvocationType getInvocationType() {
        return invocationType;
    }

    public void setInvocationType(InvocationType invocationType) {
        this.invocationType = invocationType;
    }

    public ResponseContext getResponseContext() {
        return responseContext;
    }

    // ??? 隔离HSFResponse ?
    @Deprecated
    public HSFResponse getHsfResponse() {
        return hsfResponse;
    }

    @Deprecated
    public void setHsfResponse(HSFResponse hsfResponse) {
        this.hsfResponse = hsfResponse;
    }

    public Object getAppResponse() {
        return getHsfResponse().getAppResponse();
    }

    public void setAppResponse(Object response) {
        getHsfResponse().setAppResponse(response);
    }

    public String getErrorMsg() {
        return getHsfResponse().getErrorMsg();
    }

    public void setErrorMsg(String error) {
        getHsfResponse().setErrorMsg(error);
    }

    public boolean isError() {
        return getHsfResponse().isError();
    }

    public void setClientErrorMsg(String error) {
        getHsfResponse().setClientErrorMsg(error);
    }

    public String getErrorType() {
        return getHsfResponse().getErrorType();
    }

    public void setErrorType(String errorType) {
        getHsfResponse().setErrorType(errorType);
    }

    public boolean isTimeout() {
        return getHsfResponse().isTimeout();
    }

    public void setIsTimeout(boolean isTimeout) {
        getHsfResponse().setIsTimeout(isTimeout);
    }

    public void setStatus(byte status) {
        getHsfResponse().setStatus(status);
    }

    @Override
    public String toString() {
        return getHsfResponse().toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy