Class MarshallingDirectives
java.lang.Object
org.apache.pekko.http.javadsl.server.directives.BasicDirectives
org.apache.pekko.http.javadsl.server.directives.CacheConditionDirectives
org.apache.pekko.http.javadsl.server.directives.CodingDirectives
org.apache.pekko.http.javadsl.server.directives.CookieDirectives
org.apache.pekko.http.javadsl.server.directives.DebuggingDirectives
org.apache.pekko.http.javadsl.server.directives.ExecutionDirectives
org.apache.pekko.http.javadsl.server.directives.FileAndResourceDirectives
org.apache.pekko.http.javadsl.server.directives.FileUploadDirectives
org.apache.pekko.http.javadsl.server.directives.FormFieldDirectives
org.apache.pekko.http.javadsl.server.directives.FutureDirectives
org.apache.pekko.http.javadsl.server.directives.HeaderDirectives
org.apache.pekko.http.javadsl.server.directives.AttributeDirectives
org.apache.pekko.http.javadsl.server.directives.HostDirectives
org.apache.pekko.http.javadsl.server.directives.MarshallingDirectives
- Direct Known Subclasses:
- MethodDirectives
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T> RoutecompleteWith(Marshaller<T, ? extends HttpResponse> marshaller, Consumer<Consumer<T>> inner) Uses the marshaller for the given type to produce a completion function that is passed to its inner function.<T> Routeentity(Unmarshaller<? super HttpEntity, T> unmarshaller, Function<T, Route> inner) Unmarshalls the requests entity using the given unmarshaller, and passes the result to [inner].<T,R> Route handleWith(Unmarshaller<? super HttpEntity, T> unmarshaller, Marshaller<R, ? extends HttpResponse> marshaller, Function<T, R> inner) Completes the request using the given function.<T> Routerequest(Unmarshaller<? super HttpRequest, T> unmarshaller, Function<T, Route> inner) Unmarshalls the request using the given unmarshaller, and passes the result to [inner].Methods inherited from class org.apache.pekko.http.javadsl.server.directives.HostDirectivesextractHost, host, host, host, hostMethods inherited from class org.apache.pekko.http.javadsl.server.directives.AttributeDirectivesattribute, optionalAttributeMethods inherited from class org.apache.pekko.http.javadsl.server.directives.HeaderDirectivescheckSameOrigin, headerValue, headerValueByName, headerValueByType, headerValuePF, optionalHeaderValue, optionalHeaderValueByName, optionalHeaderValueByType, optionalHeaderValuePFMethods inherited from class org.apache.pekko.http.javadsl.server.directives.FutureDirectivescompleteOrRecoverWith, onComplete, onComplete, onCompleteWithBreaker, onSuccess, onSuccessMethods inherited from class org.apache.pekko.http.javadsl.server.directives.FormFieldDirectivesformField, formField, formFieldList, formFieldList, formFieldList, formFieldMap, formFieldMultiMap, formFieldOptional, formFieldOptionalMethods inherited from class org.apache.pekko.http.javadsl.server.directives.FileUploadDirectivesfileUpload, fileUploadAll, storeUploadedFile, storeUploadedFilesMethods inherited from class org.apache.pekko.http.javadsl.server.directives.FileAndResourceDirectivesdefaultContentTypeResolver, defaultDirectoryRenderer, getFromBrowseableDirectories, getFromBrowseableDirectories, getFromBrowseableDirectories, getFromBrowseableDirectories, getFromBrowseableDirectories, getFromBrowseableDirectory, getFromBrowseableDirectory, getFromBrowseableDirectory, getFromBrowseableDirectory, getFromDirectory, getFromDirectory, getFromFile, getFromFile, getFromFile, getFromFile, getFromFile, getFromResource, getFromResource, getFromResource, getFromResource, getFromResourceDirectory, getFromResourceDirectory, getFromResourceDirectory, getFromResourceDirectory, listDirectoryContents, listDirectoryContents, listDirectoryContents, listDirectoryContentsMethods inherited from class org.apache.pekko.http.javadsl.server.directives.ExecutionDirectiveshandleExceptions, handleRejectionsMethods inherited from class org.apache.pekko.http.javadsl.server.directives.DebuggingDirectiveslogRequest, logRequest, logRequest, logRequestResult, logRequestResultOptional, logResult, logResult, logResultMethods inherited from class org.apache.pekko.http.javadsl.server.directives.CookieDirectivescookie, deleteCookie, deleteCookie, deleteCookie, deleteCookie, deleteCookie, optionalCookie, setCookie, setCookieMethods inherited from class org.apache.pekko.http.javadsl.server.directives.CodingDirectivesdecodeRequest, decodeRequestWith, decodeRequestWith, encodeResponse, encodeResponseWith, requestEncodedWith, responseEncodingAccepted, withPrecompressedMediaTypeSupportMethods inherited from class org.apache.pekko.http.javadsl.server.directives.CacheConditionDirectivesconditional, conditional, conditional, conditionalMethods inherited from class org.apache.pekko.http.javadsl.server.directives.BasicDirectivescancelRejection, cancelRejections, cancelRejections, extract, extractActorSystem, extractDataBytes, extractEntity, extractExecutionContext, extractLog, extractMatchedPath, extractMaterializer, extractParserSettings, extractRequest, extractRequestContext, extractRequestEntity, extractSettings, extractStrictEntity, extractStrictEntity, extractStrictEntity, extractStrictEntity, extractUnmatchedPath, extractUri, mapInnerRoute, mapRejections, mapRequest, mapRequestContext, mapResponse, mapResponseEntity, mapResponseHeaders, mapRouteResult, mapRouteResultFuture, mapRouteResultPF, mapRouteResultWith, mapRouteResultWithPF, mapSettings, mapUnmatchedPath, pass, provide, recoverRejections, recoverRejectionsWith, toStrictEntity, toStrictEntity, toStrictEntity, toStrictEntity, withExecutionContext, withLog, withMaterializer, withSettings
- 
Constructor Details- 
MarshallingDirectivespublic MarshallingDirectives()
 
- 
- 
Method Details- 
completeWithpublic <T> Route completeWith(Marshaller<T, ? extends HttpResponse> marshaller, Consumer<Consumer<T>> inner) Uses the marshaller for the given type to produce a completion function that is passed to its inner function. You can use it do decouple marshaller resolution from request completion.- Parameters:
- marshaller- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
entityUnmarshalls the requests entity using the given unmarshaller, and passes the result to [inner]. If there is a problem with unmarshalling the request is rejected with thepekko.http.javadsl.server.Rejectionproduced by the unmarshaller.- Parameters:
- unmarshaller- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
handleWithpublic <T,R> Route handleWith(Unmarshaller<? super HttpEntity, T> unmarshaller, Marshaller<R, ? extends HttpResponse> marshaller, Function<T, R> inner) Completes the request using the given function. The input to the function is produced with the in-scope entity unmarshaller and the result value of the function is marshalled with the in-scope marshaller.- Parameters:
- unmarshaller- (undocumented)
- marshaller- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
requestUnmarshalls the request using the given unmarshaller, and passes the result to [inner]. If there is a problem with unmarshalling the request is rejected with thepekko.http.javadsl.server.Rejectionproduced by the unmarshaller.- Parameters:
- unmarshaller- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
 
-