Class NetTestWebService
- java.lang.Object
-
- org.apache.openmeetings.webservice.NetTestWebService
-
@Service("netTestWebService") @Path("/networktest") public class NetTestWebService extends ObjectThe Service contains methods to trigger a network test
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetTestWebService.TestType
-
Field Summary
Fields Modifier and Type Field Description static AtomicIntegerCLIENT_COUNT
-
Constructor Summary
Constructors Constructor Description NetTestWebService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Responseget(String type, int inSize)Generate a sample for network teststatic intgetMaxClients()static NetTestWebService.TestTypegetTypeByString(String typeString)intupload(int size, InputStream stream)Upload media to test upload speed
-
-
-
Field Detail
-
CLIENT_COUNT
public static final AtomicInteger CLIENT_COUNT
-
-
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, uploadinSize- 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 IOExceptionUpload media to test upload speed- Parameters:
size- size of filestream- stream of file- Returns:
- Number of bytes uploaded
- Throws:
IOException
-
getTypeByString
public static NetTestWebService.TestType getTypeByString(String typeString)
-
getMaxClients
public static int getMaxClients()
-
-