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

com.envision.energy.eos.sdk.IAssetService 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 zhensheng.cai
 */
public interface IAssetService {

    /**
     * subscribe the asset change data , the data should match both ancestor and type
     * @param handler callback handler
     * @param assetChangeEvent {@link com.envision.energy.util.AssetChangeEventUtil}
     * @param ancestors
     * @param cimTypes
     * @throws NullPointerException
     * @throws SubscribeException
     */
    void subscribe(IAssetHandler handler, int assetChangeEvent, Collection ancestors, Collection cimTypes)
            throws NullPointerException, SubscribeException;


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


    /**
     * unsubscribe asset change  which filter by asset handler .
     * @param handler
     *
     * @throws SubscribeException
     */
    void unsubscribe(IAssetHandler handler) throws  SubscribeException;

    void shutdown();

    /**
     * only subscribe asset change info by customerIds
     *
     * @param handler callback handler
     * @param assetChangeEvent {@link com.envision.energy.util.AssetChangeEventUtil}
     */
    void subscribeAncestors(IAssetHandler handler, int assetChangeEvent, Collection ancestorIds) throws SubscribeException;

    /**
     * only subscribe asset change info by typeIds
     * @param handler callback handler
     * @param assetChangeEvent {@link com.envision.energy.util.AssetChangeEventUtil}
     * @param types
     */
    void subscribeTypes(IAssetHandler handler, int assetChangeEvent, Collection types) throws SubscribeException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy