
org.hyperledger.fabric.contract.ContextFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-chaincode-shim Show documentation
Show all versions of fabric-chaincode-shim Show documentation
Hyperledger Fabric Java Chaincode Shim
The newest version!
/*
* Copyright 2019 IBM All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.fabric.contract;
import org.hyperledger.fabric.shim.ChaincodeStub;
/** Factory to create {@link Context} from {@link ChaincodeStub} by wrapping stub with dynamic proxy. */
public final class ContextFactory {
private static final ContextFactory INSTANCE = new ContextFactory();
/** @return ContextFactory */
public static ContextFactory getInstance() {
return INSTANCE;
}
/**
* @param stub
* @return Context
*/
public Context createContext(final ChaincodeStub stub) {
return new Context(stub);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy