Interface RouteInfo<R>

Type Parameters:
R - The route
All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource
All Known Subinterfaces:
MethodBasedRouteMatch<T,R>, RouteMatch<R>, UriRouteMatch<T,R>
All Known Implementing Classes:
BasicObjectRouteMatch

public interface RouteInfo<R> extends AnnotationMetadataProvider
Common information shared between route and route match.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • getReturnType

      ReturnType<? extends R> getReturnType()
      Returns:
      The return type
    • getBodyType

      default Argument<?> getBodyType()
      Returns:
      The argument representing the data type being produced.
    • getDeclaringType

      Class<?> getDeclaringType()
      Returns:
      The declaring type of the route.
    • getProduces

      default List<MediaType> getProduces()
      The media types able to produced by this route.
      Returns:
      A list of MediaType that this route can produce
    • getConsumes

      default List<MediaType> getConsumes()
      The media types able to produced by this route.
      Returns:
      A list of MediaType that this route can produce
    • isSuspended

      default boolean isSuspended()
      Returns:
      Is this route match a suspended function (Kotlin).
      Since:
      2.0.0
    • isReactive

      default boolean isReactive()
      Returns:
      Is the route a reactive route.
      Since:
      2.0.0
    • isSingleResult

      default boolean isSingleResult()
      Returns:
      Does the route emit a single result or multiple results
      Since:
      2.0
    • isSpecifiedSingle

      default boolean isSpecifiedSingle()
      Returns:
      Does the route emit a single result or multiple results
      Since:
      2.0
    • isCompletable

      default boolean isCompletable()
      Returns:
      is the return type completable
      Since:
      2.0
    • isAsync

      default boolean isAsync()
      Returns:
      Is the route an async route.
      Since:
      2.0.0
    • isAsyncOrReactive

      default boolean isAsyncOrReactive()
      Returns:
      Is the route an async or reactive route.
      Since:
      2.0.0
    • isVoid

      default boolean isVoid()
      Returns:
      Does the route return void
      Since:
      2.0.0
    • isErrorRoute

      default boolean isErrorRoute()
      Returns:
      True if the route was called due to an error
      Since:
      3.0.0
    • findStatus

      @NonNull default HttpStatus findStatus(HttpStatus defaultStatus)
      Finds predefined route http status or uses default.
      Parameters:
      defaultStatus - The default status
      Returns:
      The status
      Since:
      2.5.2
    • isWebSocketRoute

      default boolean isWebSocketRoute()
      Checks if route is for web socket.
      Returns:
      true if it's web socket route
      Since:
      2.5.2