类 RpcResult

    • 构造器详细资料

      • RpcResult

        public RpcResult()
      • RpcResult

        public RpcResult​(Object result)
      • RpcResult

        public RpcResult​(Throwable exception)
    • 方法详细资料

      • recreate

        public Object recreate()
                        throws Throwable
        从接口复制的说明: Result
        Recreate.

        if (hasException()) { throw getException(); } else { return getValue(); }

        指定者:
        recreate 在接口中 Result
        返回:
        result.
        抛出:
        Throwable
      • getValue

        public Object getValue()
        从接口复制的说明: Result
        Get invoke result.
        指定者:
        getValue 在接口中 Result
        返回:
        result. if no result return null.
      • setValue

        public void setValue​(Object value)
      • getException

        public Throwable getException()
        从接口复制的说明: Result
        Get exception.
        指定者:
        getException 在接口中 Result
        返回:
        exception. if no exception return null.
      • setException

        public void setException​(Throwable e)
      • hasException

        public boolean hasException()
        从接口复制的说明: Result
        Has exception.
        指定者:
        hasException 在接口中 Result
        返回:
        has exception.
      • setAttachments

        public void setAttachments​(Map<String,​String> map)
        Append all items from the map into the attachment, if map is empty then nothing happens
        参数:
        map - contains all key-value pairs to append
      • addAttachments

        public void addAttachments​(Map<String,​String> map)
      • getAttachment

        public String getAttachment​(String key)
        从接口复制的说明: Result
        get attachment by key.
        指定者:
        getAttachment 在接口中 Result
        返回:
        attachment value.
      • getAttachment

        public String getAttachment​(String key,
                                    String defaultValue)
        从接口复制的说明: Result
        get attachment by key with default value.
        指定者:
        getAttachment 在接口中 Result
        返回:
        attachment value.
      • setAttachment

        public void setAttachment​(String key,
                                  String value)