@@ -65,11 +65,18 @@ interface Match {
6565 /**
6666 * Executes matched route.
6767 *
68- * @param context not null.
69- * @param pipeline Handler.
68+ * @param context Web Context.
69+ * @param pipeline Route pipeline.
70+ * @return route response.
7071 */
7172 Object execute (@ NonNull Context context , @ NonNull Route .Handler pipeline );
7273
74+ /**
75+ * Executes matched route.
76+ *
77+ * @param context Web Context.
78+ * @return route response.
79+ */
7380 default Object execute (@ NonNull Context context ) {
7481 return execute (context , route ().getPipeline ());
7582 }
@@ -202,10 +209,20 @@ default Object execute(@NonNull Context context) {
202209 *
203210 * @return Application context path (a.k.a as base path).
204211 */
205- @ NonNull String getContextPath ();
212+ String getContextPath ();
206213
214+ /**
215+ * True when router started.
216+ *
217+ * @return True when router started.
218+ */
207219 boolean isStarted ();
208220
221+ /**
222+ * True when router stopped.
223+ *
224+ * @return True when router stopped.
225+ */
209226 boolean isStopped ();
210227
211228 /**
@@ -450,17 +467,22 @@ default Object execute(@NonNull Context context) {
450467 * @param worker Default worker thread pool.
451468 * @return This router.
452469 */
453- @ NonNull Router setDefaultWorker (@ NonNull Executor worker );
470+ Router setDefaultWorker (@ NonNull Executor worker );
454471
455- @ NonNull OutputFactory getOutputFactory ();
472+ /**
473+ * Output factory.
474+ *
475+ * @return Output factory.
476+ */
477+ OutputFactory getOutputFactory ();
456478
457479 /**
458480 * Attach a filter to the route pipeline.
459481 *
460482 * @param filter Filter.
461483 * @return This router.
462484 */
463- @ NonNull Router use (@ NonNull Route .Filter filter );
485+ Router use (@ NonNull Route .Filter filter );
464486
465487 /**
466488 * Add a before route decorator to the route pipeline.
@@ -841,7 +863,7 @@ default Object execute(@NonNull Context context) {
841863 *
842864 * @return Template for the flash cookie.
843865 */
844- @ NonNull Cookie getFlashCookie ();
866+ Cookie getFlashCookie ();
845867
846868 /**
847869 * Sets a cookie used as a template to generate the flash cookie, allowing to customize the cookie
@@ -850,19 +872,30 @@ default Object execute(@NonNull Context context) {
850872 * @param flashCookie The cookie template.
851873 * @return This router.
852874 */
853- @ NonNull Router setFlashCookie (@ NonNull Cookie flashCookie );
875+ Router setFlashCookie (@ NonNull Cookie flashCookie );
854876
855- @ NonNull ValueFactory getValueFactory ();
877+ /**
878+ * Value factory.
879+ *
880+ * @return Value factory.
881+ */
882+ ValueFactory getValueFactory ();
856883
857- @ NonNull Router setValueFactory (@ NonNull ValueFactory valueFactory );
884+ /**
885+ * Set value factory, useful for custom value factory.
886+ *
887+ * @param valueFactory Value factory.
888+ * @return This router.
889+ */
890+ Router setValueFactory (@ NonNull ValueFactory valueFactory );
858891
859892 /**
860893 * Ensure path start with a <code>/</code>(leading slash).
861894 *
862895 * @param path Path to process.
863896 * @return Path with leading slash.
864897 */
865- static @ NonNull String leadingSlash (@ Nullable String path ) {
898+ static String leadingSlash (@ Nullable String path ) {
866899 if (path == null || path .length () == 0 || path .equals ("/" )) {
867900 return "/" ;
868901 }
0 commit comments