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

cn.hyperchain.sdk.service.MQService Maven / Gradle / Ivy

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

import cn.hyperchain.sdk.request.Request;
import cn.hyperchain.sdk.response.mq.MQResponse;

import java.util.List;

public interface MQService {

    /**
     * register mq queue.
     *
     * @param from        account address
     * @param queueName   queue name that you want to name it
     * @param routingkeys what message type you want to receive
     * @param isVerbose   whether need to push transaction list when push block
     * @param nodeIds     specific ids
     * @return {@link Request} of {@link MQResponse}
     */
    Request registerQueue(String from, String queueName, List routingkeys, Boolean isVerbose, int... nodeIds);

    /**
     * unregister mq queue.
     *
     * @param queueName     queue name
     * @param exchangerName exchanger name
     * @param from          account address
     * @param nodeIds       specific ids
     * @return {@link Request} of {@link Request}
     */
    Request unRegisterQueue(String from, String queueName, String exchangerName, int... nodeIds);

    /**
     * get all queue names.
     *
     * @param nodeIds specific ids
     * @return {@link Request} of {@link MQResponse}
     */
    Request getAllQueueNames(int... nodeIds);

    /**
     * inform mq server of starting work.
     *
     * @param nodeIds specific ids
     * @return {@link Request} of {@link MQResponse}
     */
    Request informNormal(int... nodeIds);

    /**
     * get exchanger names.
     *
     * @param nodeIds specific ids
     * @return {@link Request} of {@link MQResponse}
     */
    Request getExchangerName(int... nodeIds);

    /**
     * delete exchanger.
     *
     * @param exchangerName the name of exchange that you want to delete
     * @param nodeIds       specific ids
     * @return {@link Request} of {@link MQResponse}
     */
    Request deleteExchanger(String exchangerName, int... nodeIds);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy