@Test(expected = ConnectException.class) public void http_interface_is_off_when_networking_is_disabled() throws Exception { int httpPort = getFreePort(); try (Application application = Application.fromServicesXml(servicesXmlWithServer(httpPort), Networking.disable)) { HttpClient client = new org.apache.http.impl.client.DefaultHttpClient(); int statusCode = client.execute(new HttpGet("http: fail("Networking.disable is specified, but the network interface is enabled! Got status code: " + statusCode); Application unused = application; } }
public static Application fromServicesXml(String xml, Networking networking) { Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml); return new Application(applicationDir, networking, true); }
Application implements AutoCloseable { public static Application fromServicesXml(String xml, Networking networking) { Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml); return new Application(applicationDir, networking, true); } }
Application implements AutoCloseable { public static Application fromServicesXml(String xml, Networking networking) { Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml); return new Application(applicationDir, networking, true); } Application(Path path, Networking networking, boolean deletePathWhenClosing); }
Application implements AutoCloseable { public static Application fromServicesXml(String xml, Networking networking) { Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml); return new Application(applicationDir, networking, true); } Application(Path path, Networking networking, boolean deletePathWhenClosing); @Beta static Application fromBuilder(Builder builder); static Application fromServicesXml(String xml, Networking networking); static Application fromApplicationPackage(Path path, Networking networking); static Application fromApplicationPackage(File file, Networking networking); JDisc getJDisc(String id); @Override void close(); }
Application implements AutoCloseable { public static Application fromServicesXml(String xml, Networking networking) { Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml); return new Application(applicationDir, networking, true); } Application(Path path, Networking networking, boolean deletePathWhenClosing); @Beta static Application fromBuilder(Builder builder); static Application fromServicesXml(String xml, Networking networking); static Application fromApplicationPackage(Path path, Networking networking); static Application fromApplicationPackage(File file, Networking networking); JDisc getJDisc(String id); @Override void close(); static final String vespaLocalProperty; }