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

com.envision.energy.eos.sdk.IEventV2Service 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;

/**
 * @author yuanyuan.xia
 *
 * copy from IEventService for support event v2
 */
public interface IEventV2Service {
    /**
     * @param handler     event handler
     * @param customerIDs subscribe event which filter by customerID List
     * @throws NullPointerException
     * @throws SubscribeException
     */
    void subscribe(IEventV2Handler 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(IEventV2Handler 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(IEventV2Handler handler) throws  SubscribeException;

    void shutdown();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy