java.lang.Object
io.avaje.jex.spi.ProxyServiceManager
- All Implemented Interfaces:
SpiServiceManager
public abstract class ProxyServiceManager extends Object implements SpiServiceManager
Provides a delegating proxy to a SpiServiceManager.
Can be used by specific implementations like Jetty and JDK Http Server to add core functionality to provide to the specific context implementation.
-
Field Summary
Fields Modifier and Type Field Description protected SpiServiceManagerdelegate -
Constructor Summary
Constructors Constructor Description ProxyServiceManager(SpiServiceManager delegate) -
Method Summary
Modifier and Type Method Description Map<String,List<String>>formParamMap(Context ctx, String charset)Parse and return the body as form parameters.voidhandleException(SpiContext ctx, Exception e)Handle the exception.<T> TjsonRead(Class<T> clazz, SpiContext ctx)Read and return the type from json request content.voidjsonWrite(Object bean, SpiContext ctx)Write as json to response content.<E> voidjsonWriteStream(Iterator<E> iterator, SpiContext ctx)Write as json stream to response content.<E> voidjsonWriteStream(Stream<E> stream, SpiContext ctx)Write as json stream to response content.Routing.TypelookupRoutingType(String method)Return the routing type given the http method.voidmaybeClose(Object iterator)Maybe close if iterator is a AutoClosable.Map<String,List<String>>parseParamMap(String body, String charset)Parse and return the content as url encoded parameters.voidrender(Context ctx, String name, Map<String,Object> model)Render using template manager.StringrequestCharset(Context ctx)Return the character set of the request.
-
Field Details
-
delegate
-
-
Constructor Details
-
ProxyServiceManager
-
-
Method Details
-
jsonRead
Description copied from interface:SpiServiceManagerRead and return the type from json request content.- Specified by:
jsonReadin interfaceSpiServiceManager
-
jsonWrite
Description copied from interface:SpiServiceManagerWrite as json to response content.- Specified by:
jsonWritein interfaceSpiServiceManager
-
jsonWriteStream
Description copied from interface:SpiServiceManagerWrite as json stream to response content.- Specified by:
jsonWriteStreamin interfaceSpiServiceManager
-
jsonWriteStream
Description copied from interface:SpiServiceManagerWrite as json stream to response content.- Specified by:
jsonWriteStreamin interfaceSpiServiceManager
-
maybeClose
Description copied from interface:SpiServiceManagerMaybe close if iterator is a AutoClosable.- Specified by:
maybeClosein interfaceSpiServiceManager
-
lookupRoutingType
Description copied from interface:SpiServiceManagerReturn the routing type given the http method.- Specified by:
lookupRoutingTypein interfaceSpiServiceManager
-
handleException
Description copied from interface:SpiServiceManagerHandle the exception.- Specified by:
handleExceptionin interfaceSpiServiceManager
-
render
Description copied from interface:SpiServiceManagerRender using template manager.- Specified by:
renderin interfaceSpiServiceManager
-
requestCharset
Description copied from interface:SpiServiceManagerReturn the character set of the request.- Specified by:
requestCharsetin interfaceSpiServiceManager
-
formParamMap
Description copied from interface:SpiServiceManagerParse and return the body as form parameters.- Specified by:
formParamMapin interfaceSpiServiceManager
-
parseParamMap
Description copied from interface:SpiServiceManagerParse and return the content as url encoded parameters.- Specified by:
parseParamMapin interfaceSpiServiceManager
-