restx.annotations.GET.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中restx.annotations.GET.<init>()方法的一些代码示例,展示了GET.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GET.<init>()方法的具体详情如下:
包路径:restx.annotations.GET
类名称:GET
方法名:<init>

GET.<init>介绍

暂无

代码示例

代码示例来源:origin: restx/restx

@GET("/sessions/current")
public Optional<Session> currentSession() {
  return currentSessionResolver.resolveCurrentSession();
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/i18n/locales")
public Iterable<String> locales() {
  Collection<String> locales = new ArrayList<>();
  for (SupportedLocale supportedLocale : supportedLocales) {
    String tag = supportedLocale.getLocale().toLanguageTag();
    locales.add(Locale.ROOT.toLanguageTag().equals(tag) ? "/" : tag);
  }
  return locales;
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/thread-dump")
  public String threadDump() {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    threadDump.dump(out);
    return new String(out.toByteArray());
  }
}

代码示例来源:origin: io.restx/restx-monitor-admin

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/thread-dump")
  public String threadDump() {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    threadDump.dump(out);
    return new String(out.toByteArray());
  }
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/sessionStats")
  public Iterable<Sessions.SessionData> metrics() {
    return sessions.getAll().values();
  }
}

代码示例来源:origin: io.restx/restx-monitor-admin

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/sessionStats")
  public Iterable<Sessions.SessionData> metrics() {
    return sessions.getAll().values();
  }
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/tests/results/{key}")
  public Optional<TestResult> getTestResultByKey(String key) {
    return server.getResultByKey(key);
  }
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/restx-stats")
  public RestxStats getRestxStats() {
    return collector.getStats();
  }
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/i18n/keys")
public Iterable<String> keys() {
  return messages.keys();
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/health-checks")
public Map healthChecks() {
  return healthChecks.runHealthChecks();
}

代码示例来源:origin: io.restx/restx-specs-admin

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/tests/requests/{key}")
public Optional<TestRequest> getTestRequestByKey(String key) {
  return server.getRequestByKey(key);
}

代码示例来源:origin: io.restx/restx-apidocs

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/specs")
public Iterable<String> findSpecsForOperation(String httpMethod, String path) {
  return repository.findSpecsByOperation(httpMethod, path);
}

代码示例来源:origin: io.restx/restx-i18n-admin

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/i18n/keys")
public Iterable<String> keys() {
  return messages.keys();
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/config/elements")
  public Iterable<ConfigElement> findConfigElements() {
    return config.elements();
  }
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
  @GET("/@/pages")
  public Iterable<AdminPage> findPages(@Param(kind = Param.Kind.CONTEXT, value = "baseUri") String baseUri) {
    List<AdminPage> rootedPages = Lists.newArrayList();
    for (AdminPage page : pages) {
      rootedPages.add(page.rootOn(baseUri));
    }
    return rootedPages;
  }
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/specs")
public Iterable<String> findSpecsForOperation(String httpMethod, String path) {
  return repository.findSpecsByOperation(httpMethod, path);
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/tests/requests/{key}")
public Optional<TestRequest> getTestRequestByKey(String key) {
  return server.getRequestByKey(key);
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/i18n/messages/{locale}")
public Map<String, String> messages(String locale) {
  Locale l = toLocale(locale);
  Map<String, String> m = new LinkedHashMap<>();
  for (String key : messages.keys()) {
    m.put(key, messages.getMessageTemplate(key, l));
  }
  return m;
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/tests/results/summaries")
@Verbosity(RestxLogLevel.QUIET)
public Iterable<TestResultSummary> findCurrentTestResults() {
  return server.findCurrentTestResults();
}

代码示例来源:origin: restx/restx

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/metrics")
public Map metrics() {
  return ImmutableMap.of(
      "gauges", metrics.getGauges(),
      "timers", metrics.getTimers(),
      "meters", metrics.getMeters(),
      "counters", metrics.getCounters(),
      "histograms", metrics.getHistograms()
  );
}

相关文章