Class NetTestWebService

java.lang.Object
org.apache.openmeetings.webservice.NetTestWebService

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

  • Constructor Details

    • NetTestWebService

      public NetTestWebService()
  • Method Details

    • 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
    • getTypeByString

      public static NetTestWebService.TestType getTypeByString(String typeString)
    • getMaxClients

      public static int getMaxClients()