当前位置: 首页>>代码示例>>Java>>正文


Java WSConnectionTracker类代码示例

本文整理汇总了Java中org.everrest.websockets.WSConnectionTracker的典型用法代码示例。如果您正苦于以下问题:Java WSConnectionTracker类的具体用法?Java WSConnectionTracker怎么用?Java WSConnectionTracker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WSConnectionTracker类属于org.everrest.websockets包,在下文中一共展示了WSConnectionTracker类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureServlets

import org.everrest.websockets.WSConnectionTracker; //导入依赖的package包/类
@Override
protected void configureServlets() {
  filter(pathForLoginFilter).through(com.codenvy.auth.sso.client.LoginFilter.class);

  // comma separated list of paths like "/service1,/service2"
  bindConstant().annotatedWith(Names.named("csrf_filter.paths_accepting_parameters")).to("/ssh");
  filter(pathForLoginFilter).through(CodenvyCsrfFilter.class);

  final Map<String, String> corsFilterParams = new HashMap<>();
  corsFilterParams.put("cors.allowed.origins", DEFAULT_ALLOWED_ORIGINS);
  corsFilterParams.put(
      "cors.allowed.methods", "GET," + "POST," + "HEAD," + "OPTIONS," + "PUT," + "DELETE");
  corsFilterParams.put(
      "cors.allowed.headers",
      "Content-Type,"
          + "X-Requested-With,"
          + "accept,"
          + "Origin,"
          + "Access-Control-Request-Method,"
          + "Access-Control-Request-Headers");
  corsFilterParams.put("cors.support.credentials", "true");
  // preflight cache is available for 10 minutes
  corsFilterParams.put("cors.preflight.maxage", "10");
  bind(CorsFilter.class).in(Singleton.class);
  filter("/*").through(CorsFilter.class, corsFilterParams);

  bind(com.codahale.metrics.servlets.ThreadDumpServlet.class).in(Singleton.class);
  bind(com.codahale.metrics.servlets.PingServlet.class).in(Singleton.class);
  serve("/metrics/ping").with(com.codahale.metrics.servlets.PingServlet.class);
  serve("/metrics/threaddump").with(com.codahale.metrics.servlets.ThreadDumpServlet.class);

  serve("/oauth").with(com.codenvy.auth.sso.oauth.OAuthLoginServlet.class);
  filter("/oauth").through(com.codenvy.auth.sso.oauth.OauthLoginFilter.class);
  install(new com.codenvy.auth.sso.client.deploy.SsoClientServletModule());
  serveRegex("^((?!(\\/(ws|eventbus|websocket)($|\\/.*)))\\/.*)")
      .with(org.everrest.guice.servlet.GuiceEverrestServlet.class);

  getServletContext().addListener(new WSConnectionTracker());
  install(new com.codenvy.auth.sso.client.deploy.SsoClientServletModule());
  install(new BasicSwaggerConfigurationModule());
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:42,代码来源:OnPremisesIdeApiServletModule.java

示例2: configureServlets

import org.everrest.websockets.WSConnectionTracker; //导入依赖的package包/类
@Override
protected void configureServlets() {
    getServletContext().addListener(new WSConnectionTracker());

    bind(AdaptiveEnvironmentFilter.class)
            .toProvider(SpringIntegration.fromSpring(AdaptiveEnvironmentFilter.class, "adaptiveEnvironmentFilter"))
            .in(Singleton.class);

    Filter corsFilter = getCORSFilter();


    filter("/*").through(corsFilter); //TODO remove this filter in PRODUCTION
    filter("/*").through(AdaptiveEnvironmentFilter.class);
    serve("/api/ws/*").with(CodenvyEverrestWebSocketServlet.class);
    serve("/api/*").with(GuiceEverrestServlet.class);


}
 
开发者ID:AdaptiveMe,项目名称:adaptive-services-dashbar,代码行数:19,代码来源:ApiServletModule.java

示例3: configureServlets

import org.everrest.websockets.WSConnectionTracker; //导入依赖的package包/类
@Override
protected void configureServlets() {
  getServletContext().addListener(new WSConnectionTracker());
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:WsAgentServletModule.java


注:本文中的org.everrest.websockets.WSConnectionTracker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。