コード例 #1
0
 @Bean
 GameUpdateService patchService() {
   if (environment.containsProperty("disable.update")) {
     return new MockGameUpdateService();
   }
   return new GameUpdateServiceImpl();
 }
コード例 #2
0
 @Bean
 GravatarService gravatarService() {
   if (environment.containsProperty("faf.testing")) {
     return new MockGravatarService();
   }
   return new GravatarServiceImpl();
 }
コード例 #3
0
 @Bean
 LeaderboardService leaderboardService() {
   if (environment.containsProperty("faf.testing")) {
     return new MockLeaderboardService();
   }
   return new LeaderboardServiceImpl();
 }
コード例 #4
0
 @Bean
 ChatService chatService() {
   if (environment.containsProperty("faf.testing")) {
     return new MockChatService();
   }
   return new PircBotXChatService();
 }
コード例 #5
0
 @Bean
 StatisticsServerAccessor statisticsServerAccessor() {
   if (environment.containsProperty("faf.testing")) {
     return new MockStatisticsServerAccessor();
   }
   return new StatisticsServerAccessorImpl();
 }
コード例 #6
0
 @Bean
 FafApiAccessor fafApiAccessor() {
   if (environment.containsProperty("faf.testing")) {
     return new MockFafApiAccessor();
   }
   return new FafApiAccessorImpl();
 }
コード例 #7
0
 @Bean
 ClientUpdateService updateService() {
   if (environment.containsProperty("faf.testing")) {
     return new MockClientUpdateService();
   } else {
     return new ClientUpdateServiceImpl();
   }
 }
コード例 #8
0
  @Bean
  CustomerRealmWebService customerRealmWebService(
      Environment environment,
      AccessTokens accessTokens,
      CustomerRealmProperties customerRealmProperties) {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setAddress(customerRealmProperties.getServiceUrl());
    factory.setServiceClass(CustomerRealmWebService.class);
    OAuth2TokenInterceptor oAuth2TokenInterceptor =
        new OAuth2TokenInterceptor(accessTokens, SERVICE_ID);
    factory.getOutInterceptors().add(oAuth2TokenInterceptor);

    if (environment.containsProperty("debug") || environment.containsProperty("trace")) {
      LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
      loggingInInterceptor.setPrettyLogging(true);
      LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
      loggingOutInterceptor.setPrettyLogging(true);
      factory.getInInterceptors().add(loggingInInterceptor);
      factory.getOutInterceptors().add(loggingOutInterceptor);
    }

    return (CustomerRealmWebService) factory.create();
  }