??????????????HttpServer?????????????
???????????? ???????[ 2014/2/28 10:21:22 ] ?????????????? ???? ????
???????????????????????????????????????????????????????????????????
???????? ???http???????url??params??????????????????????????????????????????
??????????????????????????????????????????????????????????????谓??????????
???????????????????????????????????????????????????????JDK?????HttpServer???????????卸?JDK???????些???蔚???????????????????????????????????????????????????????
????????位????????????????些?????????????????????????????????1~2??????锟�??????????????????????????????????渭????????????????????写??????????位??????????????
??????????????????????????????????? http://127.0.0.1/getlog?id=123&path=testlog&type=r??????????????testlog????????????????devlog?????????????????????位???????????????????位?????????????????????
??????????????url?械?????????????????锟�?
????Map Params = (Map) httpExchange.getAttribute(“parameters”);
????JDK?????????????????????getAttribute??
????Filter modules may store arbitrary objects with HttpExchange instances as an out-of-band communication mechanism. Other Filters or the exchange handler may then access these objects.
????????????????????????????????????????????????????写????????????
????1000???????路?10000?????????????????????????????????????????????????????????????????????1000??????????????????????
????httpExchange.getAttribute()???????????????锟�??????????????????
????public class HttpServersPerfTest extends BaseCase {
????private static final Log logger = LogFactory.getLog(AlisaNodeHttpServersPerfTest.class);
????int maxThread = 1000;
????private int totalTask = 1000;
????@Test
????public void testRequestRunningLog() throws InterruptedException {
????execute();
????}
????private void execute() throws InterruptedException {
????ExecutorService pool = Executors.newFixedThreadPool(maxThread);
????final CountDownLatch countDownLatch = new CountDownLatch(totalTask);
????for (int n = 0; n < totalTask; n++) {
????pool.execute(new RequestHttpServerThread(countDownLatch));
????}
????try {
????countDownLatch.await();
????System.err.println(“==============>>>>> ?路?????” );
????} catch (InterruptedException e) {
????e.printStackTrace();
????}
????}
????private class RequestHttpServerThread implements Runnable {
????private CountDownLatch countDownLatch;
????public RequestHttpServerThread(CountDownLatch countDownLatch) {
????this.countDownLatch = countDownLatch;
????}
????/**
????* ??????校?????????????????????????????????????????薪??????写??
????* ?????????????????????斜??
????*/
??????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11