Class ServiceRequest<T>

  • Type Parameters:
    T -
    Direct Known Subclasses:
    BsonRequest, ByteArrayRequest, JsonRequest

    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 <andrea@softinstigate.com>
    • Field Detail

      • content

        protected T content
    • Constructor Detail

      • ServiceRequest

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

      • 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