Class ChaincodeBase

  • All Implemented Interfaces:
    Chaincode


    public abstract class ChaincodeBase
    extends java.lang.Object
    implements 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
    • Constructor Detail

      • ChaincodeBase

        public ChaincodeBase​()
    • Method Detail

      • init

        public abstract Chaincode.Response init​(ChaincodeStub stub)
        Description copied from interface: Chaincode
        Called during an instantiate transaction after the container has been established, allowing the chaincode to initialize its internal data.
        Specified by:
        init in interface Chaincode
      • 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​(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​(java.lang.String message)
      • newErrorResponse

        protected static Chaincode.Response newErrorResponse​(byte[] payload)
      • newErrorResponse

        protected static Chaincode.Response newErrorResponse​(java.lang.Throwable throwable)