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

com.envision.energy.eos.sdk.IEventService Maven / Gradle / Ivy

There is a newer version: 3.0.3
Show newest version
package com.envision.energy.eos.sdk;

import com.envision.energy.eos.exception.SubscribeException;

import java.util.Collection;

/**
 * Created by xiaomin.zhou on 2017/9/18.
 */
public interface IEventService {
    /**
     * @param handler     event handler
     * @param customerIDs subscribe event which filter by customerID List
     * @throws NullPointerException
     * @throws SubscribeException
     */
    void subscribe(IEventHandler handler, Collection customerIDs)
            throws NullPointerException, SubscribeException;

    /**
     * @param handler event handler
     * @param siteIDs
     * @param codes   subscribe event which filter by customerID List and code List
     *                siteID List can't be empty or null
     *                code List can be null or empty
     * @throws NullPointerException
     * @throws SubscribeException
     */
    void subscribe(IEventHandler handler, Collection siteIDs, Collection codes)
            throws NullPointerException, SubscribeException;

    /**
     * unsubscribe all event sub.
     * if event processing is finished, you can subscribe again.
     *
     * @throws SubscribeException
     */
    void unsubscribe() throws SubscribeException;

    /**
     * unsubscribe event which filter by event handler .
     *
     * @param handler
     *
     * @throws SubscribeException
     */
    void unsubscribe(IEventHandler handler) throws  SubscribeException;

    void shutdown();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy