Package org.hyperledger.fabric.shim
Class ResponseUtils
- java.lang.Object
-
- org.hyperledger.fabric.shim.ResponseUtils
-
public final class ResponseUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Chaincode.Response
newErrorResponse()
static Chaincode.Response
newErrorResponse(byte[] payload)
static Chaincode.Response
newErrorResponse(java.lang.String message)
static Chaincode.Response
newErrorResponse(java.lang.String message, byte[] payload)
static Chaincode.Response
newErrorResponse(java.lang.Throwable throwable)
static Chaincode.Response
newSuccessResponse()
static Chaincode.Response
newSuccessResponse(byte[] payload)
static Chaincode.Response
newSuccessResponse(java.lang.String message)
static Chaincode.Response
newSuccessResponse(java.lang.String message, byte[] payload)
-
-
-
Method Detail
-
newSuccessResponse
public static Chaincode.Response newSuccessResponse(java.lang.String message, byte[] payload)
- Parameters:
message
-payload
-- Returns:
- Chaincode.Response
-
newSuccessResponse
public static Chaincode.Response newSuccessResponse()
- Returns:
- Chaincode.Response
-
newSuccessResponse
public static Chaincode.Response newSuccessResponse(java.lang.String message)
- Parameters:
message
-- Returns:
- Chaincode.Response
-
newSuccessResponse
public static Chaincode.Response newSuccessResponse(byte[] payload)
- Parameters:
payload
-- Returns:
- Chaincode.Response
-
newErrorResponse
public static Chaincode.Response newErrorResponse(java.lang.String message, byte[] payload)
- Parameters:
message
-payload
-- Returns:
- Chaincode.Response
-
newErrorResponse
public static Chaincode.Response newErrorResponse()
- Returns:
- Chaincode.Response
-
newErrorResponse
public static Chaincode.Response newErrorResponse(java.lang.String message)
- Parameters:
message
-- Returns:
- Chaincode.Response
-
newErrorResponse
public static Chaincode.Response newErrorResponse(byte[] payload)
- Parameters:
payload
-- Returns:
- Chaincode.Response
-
newErrorResponse
public static Chaincode.Response newErrorResponse(java.lang.Throwable throwable)
- Parameters:
throwable
-- Returns:
- Chaincode.Response
-
-