package server
- Alphabetic
- By Inheritance
- server
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package directives
- package util
Type Members
- final case class AuthenticationFailedRejection(cause: Cause, challenge: HttpChallenge) extends javadsl.server.AuthenticationFailedRejection with Rejection with Product with Serializable
Rejection created by the various akka.http.scaladsl.server.directives.SecurityDirectives.
Rejection created by the various akka.http.scaladsl.server.directives.SecurityDirectives. Signals that the request was rejected because the user could not be authenticated. The reason for the rejection is specified in the cause.
- final class CharsetNegotiator extends AnyRef
- final case class CircuitBreakerOpenRejection(cause: CircuitBreakerOpenException) extends javadsl.server.CircuitBreakerOpenRejection with Rejection with Product with Serializable
Rejection created by the
onCompleteWithBreaker
directive.Rejection created by the
onCompleteWithBreaker
directive. Signals that the request was rejected because the supplied circuit breaker is open and requests are failing fast. - trait ConjunctionMagnet[L] extends AnyRef
- final class ContentNegotiator extends AnyRef
- final case class CorsRejection(description: String) extends javadsl.server.CorsRejection with Rejection with Product with Serializable
Rejection created by the CORS directives.
- abstract class Directive[L] extends AnyRef
A directive that provides a tuple of values of type
L
to create an inner route. - type Directive0 = Directive[Unit]
- type Directive1[T] = Directive[(T)]
- trait Directives extends RouteConcatenation with BasicDirectives with CacheConditionDirectives with CookieDirectives with DebuggingDirectives with CodingDirectives with ExecutionDirectives with FileAndResourceDirectives with FileUploadDirectives with FormFieldDirectives with FutureDirectives with HeaderDirectives with HostDirectives with MarshallingDirectives with MethodDirectives with MiscDirectives with ParameterDirectives with TimeoutDirectives with PathDirectives with RangeDirectives with RespondWithDirectives with RouteDirectives with SchemeDirectives with SecurityDirectives with WebSocketDirectives with FramedEntityStreamingDirectives with AttributeDirectives with CorsDirectives with TlsDirectives
Collects all default directives into one trait for simple importing.
Collects all default directives into one trait for simple importing.
See akka.http.javadsl.server.AllDirectives for JavaDSL equivalent of this trait.
- final class EncodingNegotiator extends AnyRef
- trait ExceptionHandler extends PF
- trait ImplicitPathMatcherConstruction extends AnyRef
- final case class InvalidOriginRejection(allowedOrigins: Seq[HttpOrigin]) extends javadsl.server.InvalidOriginRejection with Rejection with Product with Serializable
Rejection created by akka.http.scaladsl.server.directives.HeaderDirectives.checkSameOrigin.
Rejection created by akka.http.scaladsl.server.directives.HeaderDirectives.checkSameOrigin. Signals that the request was rejected because
Origin
header value is invalid. - final case class InvalidRequiredValueForQueryParamRejection(parameterName: String, expectedValue: String, actualValue: String) extends javadsl.server.InvalidRequiredValueForQueryParamRejection with Rejection with Product with Serializable
Rejection created by parameter filters.
Rejection created by parameter filters. Signals that the request was rejected because a query parameter value was not equal to required one.
- final class LanguageNegotiator extends AnyRef
- sealed abstract class LowerPriorityRouteResultImplicits extends AnyRef
- sealed abstract class LowerPriorityRoutingLogImplicits extends AnyRef
- final case class MalformedFormFieldRejection(fieldName: String, errorMsg: String, cause: Option[Throwable] = None) extends javadsl.server.MalformedFormFieldRejection with RejectionWithOptionalCause with Product with Serializable
Rejection created by form field filters.
Rejection created by form field filters. Signals that the request was rejected because a form field could not be interpreted.
- final case class MalformedHeaderRejection(headerName: String, errorMsg: String, cause: Option[Throwable] = None) extends javadsl.server.MalformedHeaderRejection with RejectionWithOptionalCause with Product with Serializable
Rejection created by header directives.
Rejection created by header directives. Signals that the request was rejected because a header value is malformed.
- final case class MalformedQueryParamRejection(parameterName: String, errorMsg: String, cause: Option[Throwable] = None) extends javadsl.server.MalformedQueryParamRejection with RejectionWithOptionalCause with Product with Serializable
Rejection created by parameter filters.
Rejection created by parameter filters. Signals that the request was rejected because a query parameter could not be interpreted.
- final case class MalformedRequestContentRejection(message: String, cause: Throwable) extends javadsl.server.MalformedRequestContentRejection with Rejection with Product with Serializable
Rejection created by unmarshallers.
Rejection created by unmarshallers. Signals that the request was rejected because unmarshalling failed with an error that wasn't an
IllegalArgumentException
. Usually that means that the request content was not of the expected format. Note that semantic issues with the request content (e.g. because some parameter was out of range) will usually trigger aValidationRejection
instead. - final class MediaTypeNegotiator extends AnyRef
- final case class MethodRejection(supported: HttpMethod) extends javadsl.server.MethodRejection with Rejection with Product with Serializable
Rejection created by method filters.
Rejection created by method filters. Signals that the request was rejected because the HTTP method is unsupported.
- final case class MissingAttributeRejection[T](key: AttributeKey[T]) extends javadsl.server.MissingAttributeRejection[T] with Rejection with Product with Serializable
Rejection created by attribute directives.
Rejection created by attribute directives. Signals that the request was rejected because a required request attribute could not be found.
- final case class MissingCookieRejection(cookieName: String) extends javadsl.server.MissingCookieRejection with Rejection with Product with Serializable
Rejection created by the
cookie
directive.Rejection created by the
cookie
directive. Signals that the request was rejected because a cookie was not found. - final case class MissingFormFieldRejection(fieldName: String) extends javadsl.server.MissingFormFieldRejection with Rejection with Product with Serializable
Rejection created by form field filters.
Rejection created by form field filters. Signals that the request was rejected because a form field was not found.
- final case class MissingHeaderRejection(headerName: String) extends javadsl.server.MissingHeaderRejection with Rejection with Product with Serializable
Rejection created by header directives.
Rejection created by header directives. Signals that the request was rejected because a required header could not be found.
- final case class MissingQueryParamRejection(parameterName: String) extends javadsl.server.MissingQueryParamRejection with Rejection with Product with Serializable
Rejection created by parameter filters.
Rejection created by parameter filters. Signals that the request was rejected because a query parameter was not found.
- abstract class PathMatcher[L] extends (Path) => Matching[L]
A PathMatcher tries to match a prefix of a given string and returns either a PathMatcher.Matched instance if matched, otherwise PathMatcher.Unmatched.
- type PathMatcher0 = PathMatcher[Unit]
- type PathMatcher1[T] = PathMatcher[(T)]
- trait PathMatchers extends AnyRef
- trait Rejection extends javadsl.server.Rejection
A rejection encapsulates a specific reason why a Route was not able to handle a request.
A rejection encapsulates a specific reason why a Route was not able to handle a request. Rejections are gathered up over the course of a Route evaluation and finally converted to akka.http.scaladsl.model.HttpResponses by the
handleRejections
directive, if there was no way for the request to be completed. - final case class RejectionError(rejection: Rejection) extends RuntimeException with Product with Serializable
A Throwable wrapping a Rejection.
A Throwable wrapping a Rejection. Can be used for marshalling
Future[T]
orTry[T]
instances, whose failure side is supposed to trigger a route rejection rather than an Exception that is handled by the nearest ExceptionHandler. (Custom marshallers can of course use it as well.) - trait RejectionHandler extends (Seq[Rejection]) => Option[Route]
- trait RejectionWithOptionalCause extends Rejection
- trait RequestContext extends AnyRef
This class is not meant to be extended by user code.
This class is not meant to be extended by user code.
Immutable object encapsulating the context of an akka.http.scaladsl.model.HttpRequest as it flows through a akka-http Route structure.
- Annotations
- @DoNotInherit()
- type Route = (RequestContext) => Future[RouteResult]
- trait RouteConcatenation extends AnyRef
- type RouteGenerator[T] = (T) => Route
- sealed trait RouteResult extends javadsl.server.RouteResult
The result of handling a request.
The result of handling a request.
As a user you typically don't create RouteResult instances directly. Instead, use the methods on the RequestContext to achieve the desired effect.
- trait RoutingLog extends AnyRef
- final case class SchemeRejection(supported: String) extends javadsl.server.SchemeRejection with Rejection with Product with Serializable
Rejection created by scheme filters.
Rejection created by scheme filters. Signals that the request was rejected because the Uri scheme is unsupported.
- abstract class StandardRoute extends Route
A Route that can be implicitly converted into a Directive (fitting any signature).
- final case class TlsClientIdentityRejection(description: String, requiredExpression: String, certificateCN: Option[String], certificateSANs: Seq[String]) extends javadsl.server.TlsClientIdentityRejection with Rejection with Product with Serializable
- final case class TlsClientUnverifiedRejection(description: String) extends javadsl.server.TlsClientUnverifiedRejection with Rejection with Product with Serializable
- final case class TooManyRangesRejection(maxRanges: Int) extends javadsl.server.TooManyRangesRejection with Rejection with Product with Serializable
Rejection created by range directives.
Rejection created by range directives. Signals that the request contains too many ranges. An irregular high number of ranges indicates a broken client or a denial of service attack.
- final case class TransformationRejection(transform: (Seq[Rejection]) => Seq[Rejection]) extends javadsl.server.TransformationRejection with Rejection with Product with Serializable
A special Rejection that serves as a container for a transformation function on rejections.
A special Rejection that serves as a container for a transformation function on rejections. It is used by some directives to "cancel" rejections that are added by later directives of a similar type.
Consider this route structure for example:
put { reject(ValidationRejection("no") } ~ get { ... }
If this structure is applied to a PUT request the list of rejections coming back contains three elements:
1. A ValidationRejection 2. A MethodRejection 3. A TransformationRejection holding a function filtering out the MethodRejection
so that in the end the RejectionHandler will only see one rejection (the ValidationRejection), because the MethodRejection added by the
get
directive is canceled by theput
directive (since the HTTP method did indeed match eventually). - final case class UnacceptedResponseContentTypeRejection(supported: Set[Alternative]) extends javadsl.server.UnacceptedResponseContentTypeRejection with Rejection with Product with Serializable
Rejection created by marshallers.
Rejection created by marshallers. Signals that the request was rejected because the service is not capable of producing a response entity whose content type is accepted by the client
- final case class UnacceptedResponseEncodingRejection(supported: Set[HttpEncoding]) extends javadsl.server.UnacceptedResponseEncodingRejection with Rejection with Product with Serializable
Rejection created by encoding filters.
Rejection created by encoding filters. Signals that the request was rejected because the service is not capable of producing a response entity whose content encoding is accepted by the client
- final case class UnsatisfiableRangeRejection(unsatisfiableRanges: Seq[ByteRange], actualEntityLength: Long) extends javadsl.server.UnsatisfiableRangeRejection with Rejection with Product with Serializable
Rejection created by range directives.
Rejection created by range directives. Signals that the request was rejected because the requests contains only unsatisfiable ByteRanges. The actualEntityLength gives the client a hint to create satisfiable ByteRanges.
- final class UnsupportedRequestContentTypeRejection extends javadsl.server.UnsupportedRequestContentTypeRejection with Rejection with Product with Serializable
Rejection created by unmarshallers.
Rejection created by unmarshallers. Signals that the request was rejected because the requests content-type is unsupported.
- final case class UnsupportedRequestEncodingRejection(supported: HttpEncoding) extends javadsl.server.UnsupportedRequestEncodingRejection with Rejection with Product with Serializable
Rejection created by decoding filters.
Rejection created by decoding filters. Signals that the request was rejected because the requests content encoding is unsupported.
- final case class UnsupportedWebSocketSubprotocolRejection(supportedProtocol: String) extends javadsl.server.UnsupportedWebSocketSubprotocolRejection with Rejection with Product with Serializable
Rejection created when a websocket request was not handled because none of the given subprotocols was supported.
- final case class ValidationRejection(message: String, cause: Option[Throwable] = None) extends javadsl.server.ValidationRejection with RejectionWithOptionalCause with Product with Serializable
Rejection created by the
validation
directive as well as forIllegalArgumentExceptions
thrown by domain model constructors (e.g.Rejection created by the
validation
directive as well as forIllegalArgumentExceptions
thrown by domain model constructors (e.g. viarequire
). It signals that an expected value was semantically invalid.
Deprecated Type Members
- abstract class HttpApp extends Directives
DEPRECATED, consider https://doc.akka.io/libraries/akka-http/current/quickstart-scala/ instead
DEPRECATED, consider https://doc.akka.io/libraries/akka-http/current/quickstart-scala/ instead
Bootstrap trait for Http Server. It helps booting up an akka-http server by only defining the desired routes. It offers additional hooks to modify the default behavior.
- Annotations
- @deprecated
- Deprecated
(Since version 10.2.0) HttpApp this doesn't reflect the latest Akka APIs
Value Members
- def FIXME: Nothing
- object AuthenticationFailedRejection extends Serializable
- case object AuthorizationFailedRejection extends javadsl.server.AuthorizationFailedRejection with Rejection with Product with Serializable
Rejection created by the 'authorize' directive.
Rejection created by the 'authorize' directive. Signals that the request was rejected because the user is not authorized.
- object ConjunctionMagnet
- object ContentNegotiator
- object Directive
- object Directives extends Directives
Collects all default directives into one object for simple importing.
Collects all default directives into one object for simple importing.
See akka.http.javadsl.server.Directives for JavaDSL equivalent of this trait.
- object EncodingNegotiator
- object ExceptionHandler
- case object ExpectedWebSocketRequestRejection extends javadsl.server.ExpectedWebSocketRequestRejection with Rejection with Product with Serializable
Rejection created when a websocket request was expected but none was found.
- object LanguageNegotiator
- object PathMatcher extends ImplicitPathMatcherConstruction
- object PathMatchers extends PathMatchers
- object RejectionHandler
- case object RequestEntityExpectedRejection extends javadsl.server.RequestEntityExpectedRejection with Rejection with Product with Serializable
Rejection created by unmarshallers.
Rejection created by unmarshallers. Signals that the request was rejected because an message body entity was expected but not supplied.
- object Route
- object RouteConcatenation extends RouteConcatenation
- object RouteResult extends LowerPriorityRouteResultImplicits
- object RoutingLog extends LowerPriorityRoutingLogImplicits
- object StandardRoute
- object UnacceptedResponseEncodingRejection extends Serializable
- object UnsupportedRequestContentTypeRejection extends AbstractFunction1[Set[ContentTypeRange], UnsupportedRequestContentTypeRejection] with Serializable