Beispiel #1
0
  private void passThrough(ZoneMessage msg) {
    ZoneVO vo = dbf.findByUuid(msg.getZoneUuid(), ZoneVO.class);
    if (vo == null && allowedMessageAfterSoftDeletion.contains(msg.getClass())) {
      ZoneEO eo = dbf.findByUuid(msg.getZoneUuid(), ZoneEO.class);
      vo = ObjectUtils.newAndCopy(eo, ZoneVO.class);
    }

    if (vo == null) {
      ErrorCode err =
          errf.instantiateErrorCode(
              SysErrors.RESOURCE_NOT_FOUND,
              String.format(
                  "unable to find zone[uuid:%s], it may have been deleted", msg.getZoneUuid()));
      bus.replyErrorByMessageType((Message) msg, err);
      return;
    }

    ZoneFactory factory = this.getZoneFactory(ZoneType.valueOf(vo.getType()));
    Zone zone = factory.getZone(vo);
    zone.handleMessage((Message) msg);
  }
Beispiel #2
0
 static {
   allowedMessageAfterSoftDeletion.add(ZoneDeletionMsg.class);
 }