当前位置: 首页>>代码示例>>Java>>正文


Java AbstractDiscoveryService类代码示例

本文整理汇总了Java中org.eclipse.smarthome.config.discovery.AbstractDiscoveryService的典型用法代码示例。如果您正苦于以下问题:Java AbstractDiscoveryService类的具体用法?Java AbstractDiscoveryService怎么用?Java AbstractDiscoveryService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AbstractDiscoveryService类属于org.eclipse.smarthome.config.discovery包,在下文中一共展示了AbstractDiscoveryService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startBackgroundDiscovery

import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService; //导入依赖的package包/类
/**
 * Starts background scanning for attached devices.
 */
@Override
protected void startBackgroundDiscovery() {
    if (scanningJob == null || scanningJob.isCancelled()) {
        logger.debug("start background scanning job at intervall {}s", SCAN_INTERVAL);
        scanningJob = AbstractDiscoveryService.scheduler.scheduleWithFixedDelay(() -> {
            if (bridgeHandler.getWebInterface() != null) {
                logger.debug("start background scan on bridge {}", bridgeHandler.getThing().getUID());
                FritzAhaDiscoveryCallback callback = new FritzAhaDiscoveryCallback(bridgeHandler.getWebInterface(),
                        this);
                bridgeHandler.getWebInterface().asyncGet(callback);
            }
        }, INITIAL_DELAY, SCAN_INTERVAL, TimeUnit.SECONDS);
    } else {
        logger.debug("scanningJob active");
    }
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:20,代码来源:AVMFritzDiscoveryService.java

示例2: startBackgroundDiscovery

import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService; //导入依赖的package包/类
@Override
protected void startBackgroundDiscovery() {

    logger.trace("Start HEOS Player background discovery");

    if (scanningJob == null || scanningJob.isCancelled()) {
        this.scanningJob = AbstractDiscoveryService.scheduler.scheduleWithFixedDelay(this.scanningRunnable,
                INITIAL_DELAY, SCAN_INTERVAL, TimeUnit.SECONDS);
    }
    logger.trace("scanningJob active");

    // Debug
    // System.out.println("start background discover");

}
 
开发者ID:Wire82,项目名称:org.openhab.binding.heos,代码行数:16,代码来源:HeosPlayerDiscovery.java

示例3: activate

import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService; //导入依赖的package包/类
@Override
protected void activate(Map<String, Object> configProperties) {
    logger.debug("Config Parameters: {}", configProperties);
    Util.init(AbstractDiscoveryService.scheduler);
    discoveryManager = DiscoveryManager.getInstance();
    discoveryManager.setPairingLevel(DiscoveryManager.PairingLevel.ON);
    discoveryManager.addListener(this);
    super.activate(configProperties); // starts background discovery
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:10,代码来源:LGWebOSDiscovery.java

示例4: startBackgroundDiscovery

import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService; //导入依赖的package包/类
@Override
protected void startBackgroundDiscovery() {
    if (mZWayDeviceScanningJob == null || mZWayDeviceScanningJob.isCancelled()) {
        logger.debug("Starting background scanning job");
        mZWayDeviceScanningJob = AbstractDiscoveryService.scheduler.scheduleWithFixedDelay(
                mZWayDeviceScanningRunnable, INITIAL_DELAY, SCAN_INTERVAL, TimeUnit.SECONDS);
    } else {
        logger.debug("Scanning job is allready active");
    }
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:11,代码来源:ZWayDeviceDiscoveryService.java


注:本文中的org.eclipse.smarthome.config.discovery.AbstractDiscoveryService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。