Class SpringServerHttpConnection
java.lang.Object
net.officefloor.server.http.impl.ProcessAwareServerHttpConnectionManagedObject<ByteBuffer>
net.officefloor.spring.starter.rest.SpringServerHttpConnection
- All Implemented Interfaces:
FlowCallback,ContextAwareManagedObject,InputManagedObject,ManagedObject,ServerHttpConnection
public class SpringServerHttpConnection
extends ProcessAwareServerHttpConnectionManagedObject<ByteBuffer>
ProcessAwareServerHttpConnectionManagedObject for Spring MVC.-
Field Summary
Fields inherited from interface net.officefloor.frame.api.function.FlowCallback
ESCALATEFields inherited from interface net.officefloor.server.http.ServerHttpConnection
DEFAULT_HTTP_ENTITY_CHARSET, HTTP_CHARSET, URI_CHARSET -
Constructor Summary
ConstructorsConstructorDescriptionSpringServerHttpConnection(HttpServerLocation serverLocation, boolean isSecure, Supplier<HttpMethod> methodSupplier, Supplier<String> requestUriSupplier, HttpVersion version, NonMaterialisedHttpHeaders requestHeaders, ByteSequence requestEntity, HttpHeaderValue serverName, DateHttpHeaderClock dateHttpHeaderClock, boolean isIncludeStackTraceOnEscalation, HttpResponseWriter<ByteBuffer> writer, StreamBufferPool<ByteBuffer> bufferPool, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter handlerAdapter, org.springframework.web.servlet.DispatcherServlet dispatcherServlet, org.springframework.context.ApplicationContext applicationContext) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.context.ApplicationContextObtains theApplicationContext.org.springframework.web.servlet.DispatcherServletObtains theDispatcherServlet.jakarta.servlet.http.HttpServletRequestObtains theHttpServletRequest.jakarta.servlet.http.HttpServletResponseObtains theHttpServletResponse.getModelAndViewBridge(Method method) Obtains theModelAndViewBridgefor theMethod.org.springframework.web.method.support.ModelAndViewContainerObtains theModelAndViewContainer.org.springframework.web.context.request.NativeWebRequestObtains theNativeWebRequest.Obtains theModelAndViewBridgeto render result.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapterObtains theRequestMappingHandlerAdapter.Obtains the Spring handler.Methods inherited from class net.officefloor.server.http.impl.ProcessAwareServerHttpConnectionManagedObject
clean, exportState, getClientRequest, getObject, getRequest, getResponse, getServerLocation, getServiceFlowCallback, importState, isSecure, run, setManagedObjectContext
-
Constructor Details
-
SpringServerHttpConnection
public SpringServerHttpConnection(HttpServerLocation serverLocation, boolean isSecure, Supplier<HttpMethod> methodSupplier, Supplier<String> requestUriSupplier, HttpVersion version, NonMaterialisedHttpHeaders requestHeaders, ByteSequence requestEntity, HttpHeaderValue serverName, DateHttpHeaderClock dateHttpHeaderClock, boolean isIncludeStackTraceOnEscalation, HttpResponseWriter<ByteBuffer> writer, StreamBufferPool<ByteBuffer> bufferPool, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter handlerAdapter, org.springframework.web.servlet.DispatcherServlet dispatcherServlet, org.springframework.context.ApplicationContext applicationContext) Instantiate.- Parameters:
serverLocation-HttpServerLocation.isSecure- Indicates if secure.methodSupplier-Supplierfor theHttpRequestHttpMethod.requestUriSupplier-Supplierfor theHttpRequestURI.version-HttpVersionfor theHttpRequest.requestHeaders-NonMaterialisedHttpHeadersfor theHttpRequest.requestEntity-ByteSequencefor theHttpRequestentity.serverName- Name of the server. May benullif not sendingServerHttpHeader.dateHttpHeaderClock-DateHttpHeaderClock. May benullto not sendDateHttpHeader.isIncludeStackTraceOnEscalation-trueto include theEscalationstack trace in theHttpResponse.writer-HttpResponseWriter.bufferPool-StreamBufferPool.request-HttpServletRequest.response-HttpServletResponse.handler- Handler object.handlerAdapter-RequestMappingHandlerAdapter.dispatcherServlet-DispatcherServlet.applicationContext-ApplicationContext.
-
-
Method Details
-
getHttpServletRequest
public jakarta.servlet.http.HttpServletRequest getHttpServletRequest()Obtains theHttpServletRequest.- Returns:
HttpServletRequest.
-
getHttpServletResponse
public jakarta.servlet.http.HttpServletResponse getHttpServletResponse()Obtains theHttpServletResponse.- Returns:
HttpServletResponse.
-
getSpringHandler
Obtains the Spring handler.- Returns:
- Spring handler.
-
getRequestMappingHandlerAdapter
public org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter getRequestMappingHandlerAdapter()Obtains theRequestMappingHandlerAdapter.- Returns:
RequestMappingHandlerAdapter.
-
getDispatcherServlet
public org.springframework.web.servlet.DispatcherServlet getDispatcherServlet()Obtains theDispatcherServlet.- Returns:
DispatcherServlet.
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()Obtains theApplicationContext.- Returns:
ApplicationContext.
-
getModelAndViewContainer
public org.springframework.web.method.support.ModelAndViewContainer getModelAndViewContainer()Obtains theModelAndViewContainer.- Returns:
ModelAndViewContainer.
-
getNativeWebRequest
public org.springframework.web.context.request.NativeWebRequest getNativeWebRequest()Obtains theNativeWebRequest.- Returns:
NativeWebRequest.
-
getModelAndViewBridge
Obtains theModelAndViewBridgefor theMethod.- Parameters:
method-Method.- Returns:
ModelAndViewBridgefor theMethod.- Throws:
Exception- If fails to constructModelAndViewBridgeto theMethod.
-
getRenderModelAndViewBridge
Obtains theModelAndViewBridgeto render result.- Returns:
ModelAndViewBridgeto render result.- Throws:
Exception- If fails to obtain.
-