本文整理汇总了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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}