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

com.webank.wecross.stub.Connection Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.webank.wecross.stub;

import java.util.List;
import java.util.Map;

public interface Connection {

    // Callback for asyncSend
    interface Callback {
        void onResponse(Response response);
    }

    /**
     * asyncSend request to blockchain
     *
     * @param request
     * @param callback
     * @return
     */
    void asyncSend(Request request, Connection.Callback callback);

    // Callback for setConnectionEventHandler
    interface ConnectionEventHandler {
        void onResourcesChange(List resourceInfos);
    }
    /**
     * set the callback of connection events
     *
     * @param eventHandler
     * @return
     */
    void setConnectionEventHandler(ConnectionEventHandler eventHandler);

    /**
     * get properties
     *
     * @return Map
     */
    Map getProperties();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy