byte[] codePackage) { ChaincodeID.Builder chaincodeIDBuilder = ChaincodeID.newBuilder().setName(name).setVersion(chaincodeVersion); if (chaincodePath != null) { chaincodeIDBuilder = chaincodeIDBuilder.setPath(chaincodePath);
/** * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * Start chaincode * * @param args command line arguments */ public void start(String[] args) { try { processEnvironmentOptions(); processCommandLineOptions(args); initializeLogging(); validateOptions(); final ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName(this.id).build(); final ManagedChannelBuilder<?> channelBuilder = newChannelBuilder(); final Handler handler = new Handler(chaincodeId, this); new ChaincodeSupportStream(channelBuilder, handler::onChaincodeMessage, handler::nextOutboundChaincodeMessage); } catch (Exception e) { logger.fatal("Chaincode could not start", e); } }
/** * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
@Override public ChaincodeID getChaincodeID() { return new ChaincodeID( Chaincode.ChaincodeID.newBuilder().setName("qscc").build()); }
@Override public ChaincodeID getChaincodeID() { return new ChaincodeID( Chaincode.ChaincodeID.newBuilder().setName("qscc").build()); }
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
@Override public ChaincodeID getChaincodeID() { return new ChaincodeID( Chaincode.ChaincodeID.newBuilder().setName("qscc").build()); }