All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.contract.routing.ContractScanner Maven / Gradle / Ivy

There is a newer version: 2.5.5
Show newest version
/*
Copyright IBM Corp., DTCC All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

package org.hyperledger.fabric.contract.routing;

import org.hyperledger.fabric.contract.execution.InvocationRequest;

/**
 * Scan and keep all chaincode requests -> contract routing information
 */
public interface ContractScanner {

    /**
     * Scan classpath for all contracts and build routing information for all contracts
     * @throws IllegalAccessException
     * @throws InstantiationException
     */
    void findAndSetContracts() throws IllegalAccessException, InstantiationException;

    /**
     * Get routing information {@link Routing} based on info from {@link InvocationRequest}
     * @param req
     * @return
     */
    Routing getRouting(InvocationRequest req);

    /**
     * In case no specific {@link Routing}, get default {@link Routing}
     * @param req
     * @return
     */
    Routing getDefaultRouting(InvocationRequest req);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy