Package org.hyperledger.fabric.shim
Class ChaincodeBase
- java.lang.Object
 - 
- org.hyperledger.fabric.shim.ChaincodeBase
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.hyperledger.fabric.shim.Chaincode
Chaincode.Response 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCORE_CHAINCODE_LOGGING_LEVELstatic java.lang.StringCORE_CHAINCODE_LOGGING_SHIMstatic java.lang.StringDEFAULT_HOSTstatic intDEFAULT_PORT 
- 
Constructor Summary
Constructors Constructor Description ChaincodeBase() 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Chaincode.Responseinit(ChaincodeStub stub)Called during an instantiate transaction after the container has been established, allowing the chaincode to initialize its internal data.abstract Chaincode.Responseinvoke(ChaincodeStub stub)Called for every Invoke transaction.protected static Chaincode.ResponsenewErrorResponse()protected static Chaincode.ResponsenewErrorResponse(byte[] payload)protected static Chaincode.ResponsenewErrorResponse(java.lang.String message)protected static Chaincode.ResponsenewErrorResponse(java.lang.String message, byte[] payload)protected static Chaincode.ResponsenewErrorResponse(java.lang.Throwable throwable)protected static Chaincode.ResponsenewSuccessResponse()protected static Chaincode.ResponsenewSuccessResponse(byte[] payload)protected static Chaincode.ResponsenewSuccessResponse(java.lang.String message)protected static Chaincode.ResponsenewSuccessResponse(java.lang.String message, byte[] payload)voidstart(java.lang.String[] args)Start chaincode 
 - 
 
- 
- 
Field Detail
- 
CORE_CHAINCODE_LOGGING_SHIM
public static final java.lang.String CORE_CHAINCODE_LOGGING_SHIM
- See Also:
 - Constant Field Values
 
 
- 
CORE_CHAINCODE_LOGGING_LEVEL
public static final java.lang.String CORE_CHAINCODE_LOGGING_LEVEL
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_HOST
public static final java.lang.String DEFAULT_HOST
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
init
public abstract Chaincode.Response init(ChaincodeStub stub)
Description copied from interface:ChaincodeCalled during an instantiate transaction after the container has been established, allowing the chaincode to initialize its internal data. 
- 
invoke
public abstract Chaincode.Response invoke(ChaincodeStub stub)
Description copied from interface:ChaincodeCalled for every Invoke transaction. The chaincode may change its state variables. 
- 
start
public void start(java.lang.String[] args)
Start chaincode- Parameters:
 args- command line arguments
 
- 
newSuccessResponse
protected static Chaincode.Response newSuccessResponse(java.lang.String message, byte[] payload)
 
- 
newSuccessResponse
protected static Chaincode.Response newSuccessResponse()
 
- 
newSuccessResponse
protected static Chaincode.Response newSuccessResponse(java.lang.String message)
 
- 
newSuccessResponse
protected static Chaincode.Response newSuccessResponse(byte[] payload)
 
- 
newErrorResponse
protected static Chaincode.Response newErrorResponse(java.lang.String message, byte[] payload)
 
- 
newErrorResponse
protected static Chaincode.Response newErrorResponse()
 
- 
newErrorResponse
protected static Chaincode.Response newErrorResponse(java.lang.String message)
 
- 
newErrorResponse
protected static Chaincode.Response newErrorResponse(byte[] payload)
 
- 
newErrorResponse
protected static Chaincode.Response newErrorResponse(java.lang.Throwable throwable)
 
 - 
 
 -