public void handleExitedRegion(org.altbeacon.beacon.Region region) {
   if (isMonitoringRegion(region)) {
     String uuid = region.getId1() != null ? region.getId1().toString() : "";
     String major = region.getId2() != null ? region.getId2().toString() : "";
     String minor = region.getId3() != null ? region.getId3().toString() : "";
     this.beaconManager.stopMonitoringRegion(new Region(this.regionName, uuid, major, minor));
     this.inRegion = false;
     callback.whenExited(this.regionName);
   }
 }
 public void handleThingFound(TaggedThingBuilder thingBuilder) {
   if (this.isMonitoringType(thingBuilder.getType())) {
     if (!inRegion) {
       inRegion = true;
       callback.whenEntered(this.regionName);
     } else {
       updateRegionForThing(thingBuilder);
     }
   }
 }