Пример #1
0
  @Override
  public ComponentConfig provide(DefDescriptor<? extends RootDefinition> intfDescriptor)
      throws QuickFixException {
    ComponentConfig config = null;
    LoggingService loggingService = Aura.getLoggingService();
    loggingService.stopTimer(LoggingService.TIMER_AURA);
    loggingService.startTimer("java");
    try {
      if (configProvider != null) {
        config = configProvider.provide();
        loggingService.incrementNum("JavaCallCount");
      } else if (descriptorProvider != null) {
        config = new ComponentConfig();
        config.setDescriptor(descriptorProvider.provide());
        loggingService.incrementNum("JavaCallCount");
      }
    } catch (Exception e) {
      throw AuraExceptionUtil.wrapExecutionException(e, this.location);
    } finally {
      loggingService.stopTimer("java");
      loggingService.startTimer(LoggingService.TIMER_AURA);
    }

    return config;
  }
Пример #2
0
  @Override
  public ComponentConfig provide(ComponentDefRefBuilder ref) throws QuickFixException {
    ComponentConfig config = null;
    LoggingService loggingService = Aura.getLoggingService();
    loggingService.stopTimer(LoggingService.TIMER_AURA);
    loggingService.startTimer("java");

    try {
      config = staticConfigProvider.provide(ref);
      loggingService.incrementNum("JavaCallCount");
    } catch (Exception e) {
      throw AuraExceptionUtil.wrapExecutionException(e, this.location);
    } finally {
      loggingService.stopTimer("java");
      loggingService.startTimer(LoggingService.TIMER_AURA);
    }

    return config;
  }