Module io.avaje.jex

Interface SpiServiceManager

All Known Implementing Classes:
ProxyServiceManager

public interface SpiServiceManager
Core service methods available to Context implementations.
  • Method Details

    • jsonRead

      <T> T jsonRead(Class<T> clazz, SpiContext ctx)
      Read and return the type from json request content.
    • jsonWrite

      void jsonWrite(Object bean, SpiContext ctx)
      Write as json to response content.
    • jsonWriteStream

      <E> void jsonWriteStream(Stream<E> stream, SpiContext ctx)
      Write as json stream to response content.
    • jsonWriteStream

      <E> void jsonWriteStream(Iterator<E> iterator, SpiContext ctx)
      Write as json stream to response content.
    • maybeClose

      void maybeClose(Object iterator)
      Maybe close if iterator is a AutoClosable.
    • lookupRoutingType

      Routing.Type lookupRoutingType(String method)
      Return the routing type given the http method.
    • handleException

      void handleException(SpiContext ctx, Exception e)
      Handle the exception.
    • render

      void render(Context ctx, String name, Map<String,Object> model)
      Render using template manager.
    • requestCharset

      String requestCharset(Context ctx)
      Return the character set of the request.
    • formParamMap

      Map<String,List<String>> formParamMap(Context ctx, String charset)
      Parse and return the body as form parameters.
    • parseParamMap

      Map<String,List<String>> parseParamMap(String body, String charset)
      Parse and return the content as url encoded parameters.