Class RequestContextImpl
java.lang.Object
org.apache.pekko.http.scaladsl.server.RequestContextImpl
- All Implemented Interfaces:
- RequestContext
INTERNAL API
- 
Constructor SummaryConstructorsConstructorDescriptionRequestContextImpl(HttpRequest request, org.apache.pekko.event.LoggingAdapter log, RoutingSettings settings, ParserSettings parserSettings, scala.concurrent.ExecutionContextExecutor ec, org.apache.pekko.stream.Materializer materializer) RequestContextImpl(HttpRequest request, Uri.Path unmatchedPath, scala.concurrent.ExecutionContextExecutor executionContext, org.apache.pekko.stream.Materializer materializer, org.apache.pekko.event.LoggingAdapter log, RoutingSettings settings, ParserSettings parserSettings) 
- 
Method SummaryModifier and TypeMethodDescriptionscala.concurrent.Future<RouteResult>Completes the request with the given ToResponseMarshallable.scala.concurrent.ExecutionContextExecutorThe default ExecutionContext to be used for scheduling asynchronous logic related to this request.scala.concurrent.Future<RouteResult>Bubbles the given error up the response chain where it is dealt with by the closesthandleExceptionsdirective and itsExceptionHandler, unless the error is aRejectionError.org.apache.pekko.event.LoggingAdapterlog()The default LoggingAdapter to be used for logging messages related to this request.mapRequest(scala.Function1<HttpRequest, HttpRequest> f) Returns a copy of this context with the HttpRequest transformed by the given function.mapUnmatchedPath(scala.Function1<Uri.Path, Uri.Path> f) Returns a copy of this context with the unmatchedPath transformed by the given function.org.apache.pekko.stream.MaterializerThe default Materializer.The default ParserSettings to be used for configuring directives.reconfigure(scala.concurrent.ExecutionContextExecutor executionContext, org.apache.pekko.stream.Materializer materializer, org.apache.pekko.event.LoggingAdapter log, RoutingSettings settings) Returns a copy of this context with the given fields updated.scala.concurrent.Future<RouteResult>redirect(Uri uri, StatusCodes.Redirection redirectionType) Completes the request with redirection response of the given type to the given URI.scala.concurrent.Future<RouteResult>Rejects the request with the given rejections.request()The request this context represents.settings()The default RoutingSettings to be used for configuring directives.toString()The unmatched path of this context.Removes a potentially existing Accept header from the request headers.withExecutionContext(scala.concurrent.ExecutionContextExecutor executionContext) Returns a copy of this context with the new HttpRequest.withLog(org.apache.pekko.event.LoggingAdapter log) Returns a copy of this context with the new LoggingAdapter.withMaterializer(org.apache.pekko.stream.Materializer materializer) Returns a copy of this context with the new HttpRequest.withParserSettings(ParserSettings parserSettings) Returns a copy of this context with the newpekko.http.scaladsl.settings.ParserSettings.withRequest(HttpRequest request) Returns a copy of this context with the new HttpRequest.withRoutingSettings(RoutingSettings routingSettings) Returns a copy of this context with the new RoutingSettings.withUnmatchedPath(Uri.Path path) Returns a copy of this context with the unmatched path updated to the given one.
- 
Constructor Details- 
RequestContextImplpublic RequestContextImpl(HttpRequest request, Uri.Path unmatchedPath, scala.concurrent.ExecutionContextExecutor executionContext, org.apache.pekko.stream.Materializer materializer, org.apache.pekko.event.LoggingAdapter log, RoutingSettings settings, ParserSettings parserSettings) 
- 
RequestContextImplpublic RequestContextImpl(HttpRequest request, org.apache.pekko.event.LoggingAdapter log, RoutingSettings settings, ParserSettings parserSettings, scala.concurrent.ExecutionContextExecutor ec, org.apache.pekko.stream.Materializer materializer) 
 
- 
- 
Method Details- 
completeDescription copied from interface:RequestContextCompletes the request with the given ToResponseMarshallable.- Specified by:
- completein interface- RequestContext
- Parameters:
- trm- (undocumented)
- Returns:
- (undocumented)
 
- 
executionContextpublic scala.concurrent.ExecutionContextExecutor executionContext()Description copied from interface:RequestContextThe default ExecutionContext to be used for scheduling asynchronous logic related to this request.- Specified by:
- executionContextin interface- RequestContext
- Returns:
- (undocumented)
 
- 
failDescription copied from interface:RequestContextBubbles the given error up the response chain where it is dealt with by the closesthandleExceptionsdirective and itsExceptionHandler, unless the error is aRejectionError. In this case the wrapped rejection is unpacked and "executed".- Specified by:
- failin interface- RequestContext
- Parameters:
- error- (undocumented)
- Returns:
- (undocumented)
 
- 
logpublic org.apache.pekko.event.LoggingAdapter log()Description copied from interface:RequestContextThe default LoggingAdapter to be used for logging messages related to this request.- Specified by:
- login interface- RequestContext
- Returns:
- (undocumented)
 
- 
mapRequestDescription copied from interface:RequestContextReturns a copy of this context with the HttpRequest transformed by the given function.- Specified by:
- mapRequestin interface- RequestContext
- Parameters:
- f- (undocumented)
- Returns:
- (undocumented)
 
- 
mapUnmatchedPathDescription copied from interface:RequestContextReturns a copy of this context with the unmatchedPath transformed by the given function.- Specified by:
- mapUnmatchedPathin interface- RequestContext
- Parameters:
- f- (undocumented)
- Returns:
- (undocumented)
 
- 
materializerpublic org.apache.pekko.stream.Materializer materializer()Description copied from interface:RequestContextThe default Materializer.- Specified by:
- materializerin interface- RequestContext
- Returns:
- (undocumented)
 
- 
parserSettingsDescription copied from interface:RequestContextThe default ParserSettings to be used for configuring directives.- Specified by:
- parserSettingsin interface- RequestContext
- Returns:
- (undocumented)
 
- 
reconfigurepublic RequestContext reconfigure(scala.concurrent.ExecutionContextExecutor executionContext, org.apache.pekko.stream.Materializer materializer, org.apache.pekko.event.LoggingAdapter log, RoutingSettings settings) Description copied from interface:RequestContextReturns a copy of this context with the given fields updated.- Specified by:
- reconfigurein interface- RequestContext
- Parameters:
- executionContext- (undocumented)
- materializer- (undocumented)
- log- (undocumented)
- settings- (undocumented)
- Returns:
- (undocumented)
 
- 
redirectpublic scala.concurrent.Future<RouteResult> redirect(Uri uri, StatusCodes.Redirection redirectionType) Description copied from interface:RequestContextCompletes the request with redirection response of the given type to the given URI.- Specified by:
- redirectin interface- RequestContext
- Parameters:
- uri- (undocumented)
- redirectionType- (undocumented)
- Returns:
- (undocumented)
 
- 
rejectpublic scala.concurrent.Future<RouteResult> reject(scala.collection.immutable.Seq<Rejection> rejections) Description copied from interface:RequestContextRejects the request with the given rejections.- Specified by:
- rejectin interface- RequestContext
- Parameters:
- rejections- (undocumented)
- Returns:
- (undocumented)
 
- 
requestDescription copied from interface:RequestContextThe request this context represents. Modelled as a `val` so as to enable an `import ctx.request._`.- Specified by:
- requestin interface- RequestContext
 
- 
settingsDescription copied from interface:RequestContextThe default RoutingSettings to be used for configuring directives.- Specified by:
- settingsin interface- RequestContext
- Returns:
- (undocumented)
 
- 
toString
- 
unmatchedPathDescription copied from interface:RequestContextThe unmatched path of this context. Modelled as a `val` so as to enable an `import ctx.unmatchedPath._`.- Specified by:
- unmatchedPathin interface- RequestContext
 
- 
withAcceptAllDescription copied from interface:RequestContextRemoves a potentially existing Accept header from the request headers.- Specified by:
- withAcceptAllin interface- RequestContext
- Returns:
- (undocumented)
 
- 
withExecutionContextpublic RequestContext withExecutionContext(scala.concurrent.ExecutionContextExecutor executionContext) Description copied from interface:RequestContextReturns a copy of this context with the new HttpRequest.- Specified by:
- withExecutionContextin interface- RequestContext
- Parameters:
- executionContext- (undocumented)
- Returns:
- (undocumented)
 
- 
withLogDescription copied from interface:RequestContextReturns a copy of this context with the new LoggingAdapter.- Specified by:
- withLogin interface- RequestContext
- Parameters:
- log- (undocumented)
- Returns:
- (undocumented)
 
- 
withMaterializerDescription copied from interface:RequestContextReturns a copy of this context with the new HttpRequest.- Specified by:
- withMaterializerin interface- RequestContext
- Parameters:
- materializer- (undocumented)
- Returns:
- (undocumented)
 
- 
withParserSettingsDescription copied from interface:RequestContextReturns a copy of this context with the newpekko.http.scaladsl.settings.ParserSettings.- Specified by:
- withParserSettingsin interface- RequestContext
- Parameters:
- parserSettings- (undocumented)
- Returns:
- (undocumented)
 
- 
withRequestDescription copied from interface:RequestContextReturns a copy of this context with the new HttpRequest.- Specified by:
- withRequestin interface- RequestContext
- Parameters:
- request- (undocumented)
- Returns:
- (undocumented)
 
- 
withRoutingSettingsDescription copied from interface:RequestContextReturns a copy of this context with the new RoutingSettings.- Specified by:
- withRoutingSettingsin interface- RequestContext
- Parameters:
- routingSettings- (undocumented)
- Returns:
- (undocumented)
 
- 
withUnmatchedPathDescription copied from interface:RequestContextReturns a copy of this context with the unmatched path updated to the given one.- Specified by:
- withUnmatchedPathin interface- RequestContext
- Parameters:
- path- (undocumented)
- Returns:
- (undocumented)
 
 
-