Class NetTestWebService


  • @Service("netTestWebService")
    @Path("/networktest")
    public class NetTestWebService
    extends Object
    The Service contains methods to trigger a network test
    • Field Detail

    • Constructor Detail

      • NetTestWebService

        public NetTestWebService()
    • Method Detail

      • get

        @GET
        @Produces("application/octet-stream")
        @Path("/")
        public javax.ws.rs.core.Response get​(@QueryParam("type")
                                             String type,
                                             @QueryParam("size")
                                             int inSize)
        Generate a sample for network test
        Parameters:
        type - one of ping, jitter, download, upload
        inSize - requests size of sample
        Returns:
        Content as requested
      • upload

        @POST
        @Consumes("application/octet-stream")
        @Path("/")
        public int upload​(@QueryParam("size")
                          int size,
                          InputStream stream)
                   throws IOException
        Upload media to test upload speed
        Parameters:
        size - size of file
        stream - stream of file
        Returns:
        Number of bytes uploaded
        Throws:
        IOException
      • getMaxClients

        public static int getMaxClients()