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


Java ThingTypeUID.equals方法代码示例

本文整理汇总了Java中org.eclipse.smarthome.core.thing.ThingTypeUID.equals方法的典型用法代码示例。如果您正苦于以下问题:Java ThingTypeUID.equals方法的具体用法?Java ThingTypeUID.equals怎么用?Java ThingTypeUID.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.smarthome.core.thing.ThingTypeUID的用法示例。


在下文中一共展示了ThingTypeUID.equals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(THING_TYPE_HOME)) {
        TadoHomeHandler tadoHomeHandler = new TadoHomeHandler((Bridge) thing);

        TadoDiscoveryService discoveryService = new TadoDiscoveryService(tadoHomeHandler);
        bundleContext.registerService(DiscoveryService.class.getName(), discoveryService,
                new Hashtable<String, Object>());

        return tadoHomeHandler;
    } else if (thingTypeUID.equals(THING_TYPE_ZONE)) {
        return new TadoZoneHandler(thing);
    } else if (thingTypeUID.equals(THING_TYPE_MOBILE_DEVICE)) {
        return new TadoMobileDeviceHandler(thing);
    }

    return null;
}
 
开发者ID:dfrommi,项目名称:openhab-tado,代码行数:21,代码来源:TadoHandlerFactory.java

示例2: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(WMBusBindingConstants.THING_TYPE_BRIDGE)) {
        // create handler for WMBus bridge
        logger.debug("Creating (handler for) WMBus bridge.");
        if (thing instanceof Bridge) {
            WMBusBridgeHandler handler = new WMBusBridgeHandler((Bridge) thing);
            registerDiscoveryService(handler);
            return handler;
        } else {
            return null;
        }
    } else if (thingTypeUID.equals(WMBusBindingConstants.THING_TYPE_TECHEM_HKV)) {
        // create handler for Techem HKV device
        logger.debug("Creating (handler for) TechemHKV device.");
        return new WMBusTechemHKVHandler(thing);
    } else {
        return null;
    }
}
 
开发者ID:pokerazor,项目名称:openhab-binding-wmbus,代码行数:23,代码来源:WMBusHandlerFactory.java

示例3: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {

    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(MegaDBindingConstants.THING_TYPE_UID_BRIDGE)) {
        MegaDBridgeHandler handler = new MegaDBridgeHandler((Bridge) thing);
        return handler;
    }

    if (supportsThingType(thingTypeUID)) {
        return new MegaDHandler(thing);
    }

    return null;
}
 
开发者ID:Pshatsillo,项目名称:openhab2MegadBinding,代码行数:17,代码来源:MegaDHandlerFactory.java

示例4: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUid = thing.getThingTypeUID();
    ThingHandler handler = null;

    if (thingTypeUid.equals(JEELINK_USB_STICK_THING_TYPE) || thingTypeUid.equals(JEELINK_TCP_STICK_THING_TYPE)) {
        logger.debug("creating JeeLinkHandler for thing {}...", thing.getUID().getId());

        handler = new JeeLinkHandler((Bridge) thing);
        registerSensorDiscoveryService((JeeLinkHandler) handler);
    } else {
        handler = SensorDefinition.createHandler(thingTypeUid, thing);

        if (handler == null) {
            logger.debug("skipping creation of unknown handler for thing {} with type {}...",
                    thing.getUID().getId(), thing.getThingTypeUID().getId());
        }
    }

    return handler;
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:22,代码来源:JeeLinkHandlerFactory.java

示例5: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {

    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(MinecraftBindingConstants.THING_TYPE_SERVER)) {
        MinecraftServerHandler serverHandler = new MinecraftServerHandler((Bridge) thing);
        minecraftServers.add(serverHandler);
        return serverHandler;
    } else if (thingTypeUID.equals(MinecraftBindingConstants.THING_TYPE_PLAYER)) {
        MinecraftPlayerHandler playerHandler = new MinecraftPlayerHandler(thing);
        return playerHandler;
    } else if (thingTypeUID.equals(MinecraftBindingConstants.THING_TYPE_SIGN)) {
        MinecraftSignHandler signHandler = new MinecraftSignHandler(thing);
        return signHandler;
    }

    return null;
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:20,代码来源:MinecraftHandlerFactory.java

示例6: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(THING_TYPE_SAMPLE)) {
        return new EventBusHandler(thing);
    }

    return null;
}
 
开发者ID:IncQueryLabs,项目名称:smarthome-cep-demonstrator,代码行数:11,代码来源:EventBusHandlerFactory.java

示例7: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(THING_TYPE_SIMPLE_MOTION_SENSOR)) {
        return new SimpleMotionSensorHandler(thing);
    }

    return null;
}
 
开发者ID:IncQueryLabs,项目名称:smarthome-cep-demonstrator,代码行数:11,代码来源:SimpleMotionSensorHandlerFactory.java

示例8: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(final Thing thing) {

    if ((zmoteService == null) || (zmoteDiscoveryService == null)) {
        throw new IllegalStateException("Cannot create ZMote thing as the required services are not available!");
    }

    final ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(THING_TYPE_ZMT2)) {
        return new ZMoteHandler(thing, zmoteService, zmoteDiscoveryService);
    }

    return null;
}
 
开发者ID:alexmaret,项目名称:openhab-binding-zmote,代码行数:16,代码来源:ZMoteHandlerFactory.java

示例9: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected @Nullable ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(THING_TYPE_ROOM)) {
        return new DraytonWiserHandler(thing);
    }

    return null;
}
 
开发者ID:RobPope,项目名称:DraytonWiser,代码行数:11,代码来源:DraytonWiserHandlerFactory.java

示例10: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID uid = thing.getThingTypeUID();
    if (uid.equals(LoxoneBindingConstants.THING_TYPE_MINISERVER)) {
        if (channelTypeProvider == null) {
            // It indicates some problem with channel type provide service, but it is not a show stopper for the
            // binding, as majority of channels are defined statically
            logger.warn("Channel type provider is null when creating Miniserver thing handler.");
        }
        LoxoneMiniserverHandler handler = new LoxoneMiniserverHandler(thing, channelTypeProvider);
        return handler;
    }
    return null;
}
 
开发者ID:ppieczul,项目名称:org.openhab.binding.loxone,代码行数:15,代码来源:LoxoneHandlerFactory.java

示例11: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {

    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(THING_TYPE_HS100)) {
        return new HS110Handler(thing);
    }
    if (thingTypeUID.equals(THING_TYPE_HS110)) {
        return new HS110Handler(thing);
    }

    return null;
}
 
开发者ID:computerlyrik,项目名称:openhab2-addon-hs110,代码行数:15,代码来源:HS110HandlerFactory.java

示例12: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    logger.debug("Creating coordinator handler for {}", thing);

    ZigBeeCoordinatorHandler coordinator = null;

    // Handle coordinators here
    if (thingTypeUID.equals(ZigBeeBindingConstants.COORDINATOR_TYPE_CC2531)) {
        coordinator = new ZigBeeCoordinatorCC2531Handler((Bridge) thing, translationProvider);
    }
    // if (thingTypeUID.equals(ZigBeeBindingConstants.COORDINATOR_TYPE_CONBEE)) {
    // coordinator = new ZigBeeCoordinatorConBeeHandler((Bridge) thing, translationProvider);
    // }
    if (thingTypeUID.equals(ZigBeeBindingConstants.COORDINATOR_TYPE_EMBER)) {
        coordinator = new ZigBeeCoordinatorEmberHandler((Bridge) thing, translationProvider);
    }
    if (thingTypeUID.equals(ZigBeeBindingConstants.COORDINATOR_TYPE_TELEGESIS)) {
        coordinator = new ZigBeeCoordinatorTelegesisHandler((Bridge) thing, translationProvider);
    }

    if (coordinator != null) {
        ZigBeeDiscoveryService discoveryService = new ZigBeeDiscoveryService(coordinator);
        discoveryService.activate();

        discoveryServiceRegs.put(coordinator.getThing().getUID(), bundleContext.registerService(
                DiscoveryService.class.getName(), discoveryService, new Hashtable<String, Object>()));

        return coordinator;
    }

    // Everything else gets handled in a single handler
    ZigBeeThingHandler handler = new ZigBeeThingHandler(thing, translationProvider);

    bundleContext.registerService(ConfigDescriptionProvider.class.getName(), handler,
            new Hashtable<String, Object>());

    return handler;
}
 
开发者ID:openhab,项目名称:org.openhab.binding.zigbee,代码行数:41,代码来源:ZigBeeHandlerFactory.java

示例13: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {

    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(FlicButtonBindingConstants.FLICBUTTON_THING_TYPE)) {
        return new FlicButtonHandler(thing);
    } else if (thingTypeUID.equals(FlicButtonBindingConstants.BRIDGE_THING_TYPE)) {
        return new FlicDaemonBridgeHandler((Bridge) thing);
    }

    return null;
}
 
开发者ID:pfink,项目名称:openhab2-flicbutton,代码行数:14,代码来源:FlicButtonHandlerFactory.java

示例14: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {

    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(FREEBOX_THING_TYPE_SERVER)) {
        return new FreeboxHandler(thing);
    }

    return null;
}
 
开发者ID:Neulinet,项目名称:Zoo,代码行数:12,代码来源:FreeboxHandlerFactory.java

示例15: createHandler

import org.eclipse.smarthome.core.thing.ThingTypeUID; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {

    ThingTypeUID thingTypeUID = thing.getThingTypeUID();

    if (thingTypeUID.equals(ZONEPLAYER_THING_TYPE_UID)) {
    	logger.debug("Creating a ZonePlayerHandler for thing '{}' with UDN '{}'",thing.getUID(),thing.getConfiguration().get(UDN));
        return new ZonePlayerHandler(thing, upnpIOService, discoveryServiceRegistry, opmlPartnerID);
    }

    return null;
}
 
开发者ID:Neulinet,项目名称:Zoo,代码行数:13,代码来源:SonosHandlerFactory.java


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