1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org
.chromium
.net
;
7 import android
.content
.Context
;
9 import org
.chromium
.base
.JNINamespace
;
12 * Wrapper class to start a Quic test server.
14 @JNINamespace("cronet")
15 public final class QuicTestServer
{
16 public static void startQuicTestServer(Context context
) {
17 nativeStartQuicTestServer(TestFilesInstaller
.getInstalledPath(context
));
20 public static void shutdownQuicTestServer() {
21 nativeShutdownQuicTestServer();
24 public static String
getServerURL() {
25 return "http://" + getServerHost() + ":" + getServerPort();
28 public static String
getServerHost() {
29 return nativeGetServerHost();
32 public static int getServerPort() {
33 return nativeGetServerPort();
36 private static native void nativeStartQuicTestServer(String filePath
);
37 private static native void nativeShutdownQuicTestServer();
38 private static native String
nativeGetServerHost();
39 private static native int nativeGetServerPort();