test_class.declarator: lifecycleEnvironment = spy(new LifecycleEnvironment())
test_class.modifier: private final
test_class.original_string: private final LifecycleEnvironment lifecycleEnvironment = spy(new LifecycleEnvironment());
test_class.type: LifecycleEnvironment
test_class.var_name: lifecycleEnvironment
test_class.declarator: metrics = new MetricRegistry()
test_class.modifier: private final
test_class.original_string: private final MetricRegistry metrics = new MetricRegistry();
test_class.type: MetricRegistry
test_class.var_name: metrics
test_class.declarator: environment = mock(Environment.class)
test_class.modifier: private final
test_class.original_string: private final Environment environment = mock(Environment.class);
test_class.type: Environment
test_class.var_name: environment
test_class.declarator: servlets = mock(ServletEnvironment.class)
test_class.modifier: private final
test_class.original_string: private final ServletEnvironment servlets = mock(ServletEnvironment.class);
test_class.type: ServletEnvironment
test_class.var_name: servlets
test_class.declarator: filterDynamic = mock(FilterRegistration.Dynamic.class)
test_class.modifier: private final
test_class.original_string: private final FilterRegistration.Dynamic filterDynamic = mock(FilterRegistration.Dynamic.class);
test_class.type: FilterRegistration.Dynamic
test_class.var_name: filterDynamic
test_class.declarator: servletDynamic = mock(ServletRegistration.Dynamic.class)
test_class.modifier: private final
test_class.original_string: private final ServletRegistration.Dynamic servletDynamic = mock(ServletRegistration.Dynamic.class);
test_class.type: ServletRegistration.Dynamic
test_class.var_name: servletDynamic
test_class.declarator: jersey = mock(JerseyEnvironment.class)
test_class.modifier: private final
test_class.original_string: private final JerseyEnvironment jersey = mock(JerseyEnvironment.class);
test_class.type: JerseyEnvironment
test_class.var_name: jersey
test_class.declarator: healthChecks = mock(HealthCheckRegistry.class)
test_class.modifier: private final
test_class.original_string: private final HealthCheckRegistry healthChecks = mock(HealthCheckRegistry.class);
test_class.type: HealthCheckRegistry
test_class.var_name: healthChecks
test_class.declarator: application = new HaraHachiBuApplication()
test_class.modifier: private final
test_class.original_string: private final HaraHachiBuApplication application = new HaraHachiBuApplication();
test_class.type: HaraHachiBuApplication
test_class.var_name: application
test_class.declarator: config = new HaraHachiBuConfiguration()
test_class.modifier: private final
test_class.original_string: private final HaraHachiBuConfiguration config = new HaraHachiBuConfiguration();
test_class.type: HaraHachiBuConfiguration
test_class.var_name: config
test_class.declarator: proxyConfiguration = new ProxyConfiguration()
test_class.modifier: private final
test_class.original_string: private final ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
test_class.type: ProxyConfiguration
test_class.var_name: proxyConfiguration
test_class.declarator: diskSpaceConfiguration = new DiskSpaceConfiguration()
test_class.modifier: private final
test_class.original_string: private final DiskSpaceConfiguration diskSpaceConfiguration = new DiskSpaceConfiguration();
test_class.type: DiskSpaceConfiguration
test_class.var_name: diskSpaceConfiguration
test_class.file: harahachibu/src/test/java/uk/co/flax/harahachibu/HaraHachiBuApplicationTest.java
test_class.identifier: HaraHachiBuApplicationTest
test_case.body: @Test
  	public void buildsServlets() throws Exception {
  		application.run(config, environment);
  	}
test_case.class_method_signature: HaraHachiBuApplicationTest.buildsServlets()
test_case.full_signature: @Test public void buildsServlets()
test_case.identifier: buildsServlets
test_case.invocations: run
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void buildsServlets()
focal_class.file: harahachibu/src/main/java/uk/co/flax/harahachibu/HaraHachiBuApplication.java
focal_class.identifier: HaraHachiBuApplication
focal_class.class_method_signature: HaraHachiBuApplication.run(HaraHachiBuConfiguration config, Environment environment)
focal_class.full_signature: @Override public void run(HaraHachiBuConfiguration config, Environment environment)
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: (HaraHachiBuConfiguration config, Environment environment)
focal_class.return: void
focal_class.signature: void run(HaraHachiBuConfiguration config, Environment environment)
focal_class.class_method_signature: HaraHachiBuApplication.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.superclass: extends Application<HaraHachiBuConfiguration>
focal_method.body: @Override
  	public void run(HaraHachiBuConfiguration config, Environment environment) throws Exception {
  		// Set up the Jersey client - required for HTTP client interactions
  		final Client client = new JerseyClientBuilder(environment)
  				.using(config.getJerseyClient())
  				.build(getName());
  		// Build the disk space checker instance -
  		// this may add new resources and healthchecks to the environment.
  		final DiskSpaceChecker checker = new DiskSpaceCheckerBuilder(environment, client, config.getDiskSpace()).build();
  
  		// Set up the disk space filter
  		environment.servlets()
  				.addFilter("diskSpaceFilter", new DiskSpaceFilter(checker, config.getProxy(), "/setSpace"))
  				.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, "/*");
  
  		// Set up the proxy servlet - requires some additional configuration
  		ServletRegistration.Dynamic diskSpaceProxyServlet = environment.servlets().addServlet("diskSpaceProxyServlet", new DiskSpaceProxyServlet());
  		diskSpaceProxyServlet.setInitParameter(DiskSpaceProxyServlet.DESTINATION_SERVER_PARAM, config.getProxy().getDestinationServer());
  		diskSpaceProxyServlet.addMapping(DiskSpaceProxyServlet.PROXY_PATH_PREFIX + "/*");
  
  		// Add healthcheck
  		environment.healthChecks().register("Generic disk space checker", new DiskSpaceCheckerHealthCheck(checker));
  	}
focal_method.class_method_signature: HaraHachiBuApplication.run(HaraHachiBuConfiguration config, Environment environment)
focal_method.full_signature: @Override public void run(HaraHachiBuConfiguration config, Environment environment)
focal_method.identifier: run
focal_method.invocations: build using getJerseyClient getName build getDiskSpace addMappingForUrlPatterns addFilter servlets getProxy of addServlet servlets setInitParameter getDestinationServer getProxy addMapping register healthChecks
focal_method.modifiers: @Override public
focal_method.parameters: (HaraHachiBuConfiguration config, Environment environment)
focal_method.return: void
focal_method.signature: void run(HaraHachiBuConfiguration config, Environment environment)