本文整理汇总了Java中org.eclipse.smarthome.core.thing.Thing.getThingTypeUID方法的典型用法代码示例。如果您正苦于以下问题:Java Thing.getThingTypeUID方法的具体用法?Java Thing.getThingTypeUID怎么用?Java Thing.getThingTypeUID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.smarthome.core.thing.Thing
的用法示例。
在下文中一共展示了Thing.getThingTypeUID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的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.Thing; //导入方法依赖的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.Thing; //导入方法依赖的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.Thing; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (thingTypeUID.equals(HarmonyHubBindingConstants.HARMONY_HUB_THING_TYPE)) {
HarmonyHubHandler harmonyHubHandler = new HarmonyHubHandler((Bridge) thing, this);
registerHarmonyDeviceDiscoveryService(harmonyHubHandler);
return harmonyHubHandler;
}
if (thingTypeUID.equals(HarmonyHubBindingConstants.HARMONY_DEVICE_THING_TYPE)) {
return new HarmonyDeviceHandler(thing, this);
}
return null;
}
示例5: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (thingTypeUID.equals(ZoneMinderConstants.THING_TYPE_BRIDGE_ZONEMINDER_SERVER)) {
logger.debug("[FACTORY]: creating handler for bridge thing '{}'", thing);
ZoneMinderServerBridgeHandler bridge = new ZoneMinderServerBridgeHandler((Bridge) thing);
return bridge;
} else if (thingTypeUID.equals(ZoneMinderConstants.THING_TYPE_THING_ZONEMINDER_MONITOR)) {
return new ZoneMinderThingMonitorHandler(thing);
}
return null;
}
示例6: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(final Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (SleepIQCloudHandler.SUPPORTED_THING_TYPE_UIDS.contains(thingTypeUID)) {
logger.debug("Creating SleepIQ cloud thing handler");
SleepIQCloudHandler cloudHandler = new SleepIQCloudHandler((Bridge) thing);
registerBedDiscoveryService(cloudHandler);
return cloudHandler;
} else if (SleepIQDualBedHandler.SUPPORTED_THING_TYPE_UIDS.contains(thingTypeUID)) {
logger.debug("Creating SleepIQ dual bed thing handler");
return new SleepIQDualBedHandler(thing);
}
return null;
}
示例7: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(final Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (thingTypeUID.equals(SilvercrestWifiSocketBindingConstants.THING_TYPE_WIFI_SOCKET)) {
SilvercrestWifiSocketHandler handler;
logger.debug("Creating a new SilvercrestWifiSocketHandler...");
try {
handler = new SilvercrestWifiSocketHandler(thing);
logger.debug("SilvercrestWifiSocketMediator will register the handler.");
if (this.mediator != null) {
this.mediator.registerThingAndWifiSocketHandler(thing, handler);
} else {
logger.error(
"The mediator is missing on Handler factory. Without one mediator the handler cannot work!");
return null;
}
return handler;
} catch (MacAddressNotValidException e) {
logger.debug("The mac address passed to WifiSocketHandler by configurations is not valid.");
}
}
return null;
}
示例8: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (thingTypeUID.equals(THING_TYPE_STICK)) {
PlugwiseStickHandler handler = new PlugwiseStickHandler((Bridge) thing);
registerDiscoveryService(handler);
return handler;
} else if (thingTypeUID.equals(THING_TYPE_CIRCLE) || thingTypeUID.equals(THING_TYPE_CIRCLE_PLUS)
|| thingTypeUID.equals(THING_TYPE_STEALTH)) {
return new PlugwiseRelayDeviceHandler(thing);
} else if (thingTypeUID.equals(THING_TYPE_SCAN)) {
return new PlugwiseScanHandler(thing);
} else if (thingTypeUID.equals(THING_TYPE_SENSE)) {
return new PlugwiseSenseHandler(thing);
} else if (thingTypeUID.equals(THING_TYPE_SWITCH)) {
return new PlugwiseSwitchHandler(thing);
}
return null;
}
示例9: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的package包/类
@Override
protected ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (thingTypeUID.equals(THING_TYPE_SAMPLE)) {
return new EventBusHandler(thing);
}
return null;
}
示例10: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的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
示例11: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的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;
}
示例12: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的package包/类
@Override
protected @Nullable ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (thingTypeUID.equals(THING_TYPE_ROOM)) {
return new DraytonWiserHandler(thing);
}
return null;
}
示例13: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的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;
}
示例14: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的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;
}
示例15: createHandler
import org.eclipse.smarthome.core.thing.Thing; //导入方法依赖的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;
}