Class ServiceRequest<T>

Type Parameters:
T - generic type
Direct Known Subclasses:
BsonFromCsvRequest, BsonRequest, ByteArrayRequest, JsonRequest, StringRequest

public abstract class ServiceRequest<T> extends Request<T>
Base class for Request implementations that can be used in service requests. Only one request object can be instantiated per exchage. The request object is instantiated by ServiceExchangeInitializer using the requestInitializer() function defined by the handling service
Author:
Andrea Di Cesare <[email protected]>
  • Field Details

    • content

      protected T content
  • Constructor Details

    • ServiceRequest

      protected ServiceRequest(io.undertow.server.HttpServerExchange exchange)
  • Method Details

    • of

      public static ServiceRequest<?> of(io.undertow.server.HttpServerExchange exchange)
    • of

      public static <R extends ServiceRequest<?>> R of(io.undertow.server.HttpServerExchange exchange, Class<R> type)
    • getContent

      public T getContent()
    • setContent

      public void setContent(T content)
    • isHandledBy

      public boolean isHandledBy(String serviceName)
      Parameters:
      serviceName -
      Returns:
      true if the request is handled by the specified Service