You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: src/main/java/com/kttdevelopment/simplehttpserver/SimpleHttpServer.java
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -299,10 +299,14 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
299
299
300
300
//
301
301
302
+
// region depreciated - temporary context
303
+
302
304
/**
303
305
* Creates a temporary context at a random address that will remove itself after the first connection. This type of context is typically used for single use downloads or media file hosting. <br>
304
306
* To get the context use {@link HttpContext#getPath()}.
305
307
*
308
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
309
+
*
306
310
* @return the http context associated with the context
307
311
*
308
312
* @see HttpContext
@@ -318,12 +322,15 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* Creates a temporary context at a random address that will remove itself after the first connection or after the max time is passed. This type of context is typically used for single use downloads or media file hosting. <br>
325
330
* To get the context use {@link HttpContext#getPath()}.
326
331
*
332
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
333
+
*
327
334
* @param maxTime the maximum time the context may exist for (in milliseconds)
328
335
* @return the http context associated with the context
329
336
*
@@ -340,13 +347,16 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* Creates a temporary context at a random address that will remove itself after the first connection. This type of context is typically used for single use downloads or media file hosting. <br>
347
355
* To get the context use {@link HttpContext#getPath()}. <br>
348
356
* This method encapsulates the handler with a temporary one, so {@link HttpContext#getHandler()} will not return the one passed in the parameter, instead it will return the encapsulating handler.
349
357
*
358
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
359
+
*
350
360
* @param handler handler to use
351
361
* @return the http context associated with the context
352
362
*
@@ -364,13 +374,16 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* Creates a temporary context at a random address that will remove itself after the first connection or after the max time is passed. This type of context is typically used for single use downloads or media file hosting. <br>
371
382
* To get the context use {@link HttpContext#getPath()}. <br>
372
383
* This method encapsulates the handler with a temporary one, so {@link HttpContext#getHandler()} will not return the one passed in the parameter, instead it will return the encapsulating handler.
373
384
*
385
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
386
+
*
374
387
* @param handler handler to use
375
388
* @param maxTime the maximum time the context may exist for (in milliseconds)
376
389
* @return the http context associated with the context
@@ -389,11 +402,14 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* Creates a temporary context at a specified address that will remove itself after the first connection. This type of context is typically used for single use downloads or media file hosting. <br>
396
410
*
411
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
412
+
*
397
413
* @param context the context
398
414
* @return the http context associated with the context
399
415
* @throws IllegalArgumentException if the context is invalid or taken
@@ -412,11 +428,14 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* Creates a temporary context at a specified address that will remove itself after the first connection or after the max time is passed. This type of context is typically used for single use downloads or media file hosting. <br>
419
436
*
437
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
438
+
*
420
439
* @param context the context
421
440
* @param maxTime the maximum time the context may exist for (in milliseconds)
422
441
* @return the http context associated with the context
@@ -437,12 +456,15 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* Creates a temporary context at a specified address that will remove itself after the first connection. This type of context is typically used for single use downloads or media file hosting. <br>
444
464
* This method encapsulates the handler with a temporary one, so {@link HttpContext#getHandler()} will not return the one passed in the parameter, instead it will return the encapsulating handler.
445
465
*
466
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
467
+
*
446
468
* @param context the context
447
469
* @param handler handler to use
448
470
* @return the http context associated with the context
@@ -463,6 +485,7 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
@@ -471,6 +494,8 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
471
494
* To get the context use {@link HttpContext#getPath()}. <br>
472
495
* This method encapsulates the handler with a temporary one, so {@link HttpContext#getHandler()} will not return the one passed in the parameter, instead it will return the encapsulating handler.
473
496
*
497
+
* @deprecated Use {@link com.kttdevelopment.simplehttpserver.handler.TemporaryHandler} instead
498
+
*
474
499
* @param context the context
475
500
* @param handler handler to use
476
501
* @param maxTime the maximum time the context may exist for (in milliseconds)
@@ -492,8 +517,11 @@ public static SimpleHttpServer create(final int port, final int backlog) throws
* A temporary handler handles a single request and then removes itself from the server. This can be used for single use downloads, or media file hosting.
0 commit comments