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

cn.hyperchain.sdk.request.MQRequest Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package cn.hyperchain.sdk.request;

import cn.hyperchain.sdk.exception.RequestException;
import cn.hyperchain.sdk.exception.RequestExceptionCode;
import cn.hyperchain.sdk.provider.ProviderManager;
import cn.hyperchain.sdk.response.Response;

public class MQRequest extends Request {
    public MQRequest(String method, ProviderManager providerManager, Class clazz, int... nodeIds) {
        super(method, providerManager, clazz, nodeIds);
    }

    @Override
    public Response send() throws RequestException {
        if (this.nodeIds.length != 1) {
            throw new RequestException(RequestExceptionCode.PARAM_ERROR, "the number of NodeIds is must to be one");
        }
        return super.send();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy