=doc fix scaladoc warnings #18500

This commit is contained in:
Wojciech Langiewicz 2016-03-15 18:55:03 +01:00
parent 54fdc40f76
commit 2cdf447f6e
31 changed files with 92 additions and 93 deletions

View file

@ -10,7 +10,7 @@ import java.util.concurrent.CompletionStage
/**
* A convenience class to derive from to get everything from HttpService and Directives into scope.
* Implement the [[createRoute]] method to provide the Route and then call [[bindRoute]]
* Implement the [[#createRoute]] method to provide the Route and then call [[#bindRoute]]
* to start the server on the specified interface.
*/
abstract class HttpApp
@ -20,7 +20,7 @@ abstract class HttpApp
/**
* Starts an HTTP server on the given interface and port. Creates the route by calling the
* user-implemented [[createRoute]] method and uses the route to handle requests of the server.
* user-implemented [[#createRoute]] method and uses the route to handle requests of the server.
*/
def bindRoute(interface: String, port: Int, system: ActorSystem): CompletionStage[ServerBinding] =
bindRoute(interface, port, createRoute(), system)

View file

@ -134,7 +134,7 @@ abstract class RejectionHandler {
def handleUnacceptedResponseEncodingRejection(ctx: RequestContext, supported: jl.Iterable[HttpEncoding]): RouteResult = passRejection()
/**
* Callback called to handle rejection created by an [[akka.http.scaladsl.server.authentication.HttpAuthenticator]].
* Callback called to handle rejection created by an [[akka.http.javadsl.server.values.HttpBasicAuthenticator]].
* Signals that the request was rejected because the user could not be authenticated. The reason for the rejection is
* specified in the cause.
*

View file

@ -8,7 +8,7 @@ package akka.http.javadsl.server
* A marker interface to denote an element that handles a request.
*
* This is an opaque interface that cannot be implemented manually.
* Instead, see the predefined routes in [[Directives]] and use the [[Directives.handleWith]]
* Instead, see the predefined routes in [[Directives]] and use the [[Directives#handleWith]]
* method to create custom routes.
*/
trait Route

View file

@ -133,8 +133,7 @@ abstract class PathDirectives extends MiscDirectives {
* }
* }}}
*
* For further information, refer to:
* [[http://googlewebmastercentral.blogspot.de/2010/04/to-slash-or-not-to-slash.html]]
* For further information, refer to: http://googlewebmastercentral.blogspot.de/2010/04/to-slash-or-not-to-slash.html
*/
def pathEndOrSingleSlash: Directive = RawPathPrefixForMatchers(List(PathMatchers.SLASH.optional, PathMatchers.END))

View file

@ -22,7 +22,7 @@ abstract class RangeDirectives extends PathDirectives {
* it on the *inside* of the `conditional(...)` directive, i.e. `conditional(...)` must be
* on a higher level in your route structure in order to function correctly.
*
* @see https://tools.ietf.org/html/rfc7233
* For more information, see: https://tools.ietf.org/html/rfc7233
*/
@varargs def withRangeSupport(innerRoute: Route, moreInnerRoutes: Route*): Route = RangeSupport()(innerRoute, moreInnerRoutes.toList)
}

View file

@ -12,7 +12,7 @@ import akka.stream.javadsl.Flow
abstract class WebSocketDirectives extends SchemeDirectives {
/**
* Handles websocket requests with the given handler and rejects other requests with a
* [[ExpectedWebSocketRequestRejection]].
* [[akka.http.scaladsl.server.ExpectedWebSocketRequestRejection]].
*/
def handleWebSocketMessages(handler: Flow[Message, Message, _]): Route =
RouteStructure.HandleWebSocketMessages(handler)

View file

@ -32,16 +32,16 @@ trait BasicCredentials {
}
/**
* Implement this class to provide an HTTP Basic authentication check. The [[authenticate]] method needs to be implemented
* Implement this class to provide an HTTP Basic authentication check. The [[#authenticate]] method needs to be implemented
* to check if the supplied or missing credentials are authenticated and provide a domain level object representing
* the user as a [[RequestVal]].
* the user as a [[akka.http.javadsl.server.RequestVal]].
*/
abstract class HttpBasicAuthenticator[T](val realm: String) extends AbstractDirective with ExtractionImplBase[T] with RequestVal[T] {
protected[http] implicit def classTag: ClassTag[T] = reflect.classTag[AnyRef].asInstanceOf[ClassTag[T]]
def authenticate(credentials: BasicCredentials): CompletionStage[Optional[T]]
/**
* Creates a return value for use in [[authenticate]] that successfully authenticates the requests and provides
* Creates a return value for use in [[#authenticate]] that successfully authenticates the requests and provides
* the given user.
*/
def authenticateAs(user: T): CompletionStage[Optional[T]] = CompletableFuture.completedFuture(Optional.of(user))

View file

@ -32,16 +32,16 @@ trait OAuth2Credentials {
}
/**
* Implement this class to provide an OAuth 2 Bearer Token authentication check. The [[authenticate]] method needs to be implemented
* Implement this class to provide an OAuth 2 Bearer Token authentication check. The [[#authenticate]] method needs to be implemented
* to check if the supplied or missing credentials are authenticated and provide a domain level object representing
* the user as a [[RequestVal]].
* the user as a [[akka.http.javadsl.server.RequestVal]].
*/
abstract class OAuth2Authenticator[T](val realm: String) extends AbstractDirective with ExtractionImplBase[T] with RequestVal[T] {
protected[http] implicit def classTag: ClassTag[T] = reflect.classTag[AnyRef].asInstanceOf[ClassTag[T]]
def authenticate(credentials: OAuth2Credentials): CompletionStage[Optional[T]]
/**
* Creates a return value for use in [[authenticate]] that successfully authenticates the requests and provides
* Creates a return value for use in [[#authenticate]] that successfully authenticates the requests and provides
* the given user.
*/
def authenticateAs(user: T): CompletionStage[Optional[T]] = CompletableFuture.completedFuture(Optional.of(user))

View file

@ -20,8 +20,8 @@ import scala.reflect.ClassTag
* It is also a RequestVal that allows to access dynamic parts of the part in a
* handler.
*
* Using a PathMatcher with the [[Directives.path]] or [[Directives.pathPrefix]] directives
* "consumes" a part of the path which is recorded in [[RequestContext.unmatchedPath]].
* Using a PathMatcher with the [[akka.http.javadsl.server.Directives#path]] or [[akka.http.javadsl.server.Directives#pathPrefix]] directives
* "consumes" a part of the path which is recorded in [[akka.http.javadsl.server.RequestContext#unmatchedPath]].
*/
trait PathMatcher[T] extends RequestVal[T] {
def optional: PathMatcher[Optional[T]]

View file

@ -19,20 +19,20 @@ sealed abstract class Marshaller[-A, +B] {
/**
* Reuses this Marshaller's logic to produce a new Marshaller from another type `C` which overrides
* the [[MediaType]] of the marshalling result with the given one.
* Note that not all wrappings are legal. f the underlying [[MediaType]] has constraints with regard to the
* charsets it allows the new [[MediaType]] must be compatible, since akka-http will never recode entities.
* If the wrapping is illegal the [[Future]] produced by the resulting marshaller will contain a [[RuntimeException]].
* the [[akka.http.scaladsl.model.MediaType]] of the marshalling result with the given one.
* Note that not all wrappings are legal. f the underlying [[akka.http.scaladsl.model.MediaType]] has constraints with regard to the
* charsets it allows the new [[akka.http.scaladsl.model.MediaType]] must be compatible, since akka-http will never recode entities.
* If the wrapping is illegal the [[scala.concurrent.Future]] produced by the resulting marshaller will contain a [[RuntimeException]].
*/
def wrap[C, D >: B](newMediaType: MediaType)(f: C A)(implicit mto: ContentTypeOverrider[D]): Marshaller[C, D] =
wrapWithEC[C, D](newMediaType)(_ f)
/**
* Reuses this Marshaller's logic to produce a new Marshaller from another type `C` which overrides
* the [[MediaType]] of the marshalling result with the given one.
* Note that not all wrappings are legal. f the underlying [[MediaType]] has constraints with regard to the
* charsets it allows the new [[MediaType]] must be compatible, since akka-http will never recode entities.
* If the wrapping is illegal the [[Future]] produced by the resulting marshaller will contain a [[RuntimeException]].
* the [[akka.http.scaladsl.model.MediaType]] of the marshalling result with the given one.
* Note that not all wrappings are legal. f the underlying [[akka.http.scaladsl.model.MediaType]] has constraints with regard to the
* charsets it allows the new [[akka.http.scaladsl.model.MediaType]] must be compatible, since akka-http will never recode entities.
* If the wrapping is illegal the [[scala.concurrent.Future]] produced by the resulting marshaller will contain a [[RuntimeException]].
*/
def wrapWithEC[C, D >: B](newMediaType: MediaType)(f: ExecutionContext C A)(implicit cto: ContentTypeOverrider[D]): Marshaller[C, D] =
Marshaller { implicit ec
@ -149,7 +149,7 @@ sealed trait Marshalling[+A] {
object Marshalling {
/**
* A Marshalling to a specific [[ContentType]].
* A Marshalling to a specific [[akka.http.scaladsl.model.ContentType]].
*/
final case class WithFixedContentType[A](contentType: ContentType,
marshal: () A) extends Marshalling[A] {
@ -157,7 +157,7 @@ object Marshalling {
}
/**
* A Marshalling to a specific [[MediaType]] with a flexible charset.
* A Marshalling to a specific [[akka.http.scaladsl.model.MediaType]] with a flexible charset.
*/
final case class WithOpenCharset[A](mediaType: MediaType.WithOpenCharset,
marshal: HttpCharset A) extends Marshalling[A] {

View file

@ -38,7 +38,7 @@ final class MediaTypeNegotiator(requestHeaders: Seq[HttpHeader]) {
}
/**
* Determines whether the given [[MediaType]] is accepted by the client.
* Determines whether the given [[akka.http.scaladsl.model.MediaType]] is accepted by the client.
*/
def isAccepted(mediaType: MediaType): Boolean = qValueFor(mediaType) > 0f
}

View file

@ -58,7 +58,7 @@ abstract class Directive[L](implicit val ev: Tuple[L]) {
/**
* Maps over this directive using the given function, which can produce either a tuple or any other value
* (which will then we wrapped into a [[Tuple1]]).
* (which will then we wrapped into a [[scala.Tuple1]]).
*/
def tmap[R](f: L R)(implicit tupler: Tupler[R]): Directive[tupler.Out] =
Directive[tupler.Out] { inner tapply { values inner(tupler(f(values))) } }(tupler.OutIsTuple)
@ -70,7 +70,7 @@ abstract class Directive[L](implicit val ev: Tuple[L]) {
Directive[R] { inner tapply { values f(values) tapply inner } }
/**
* Creates a new [[Directive0]], which passes if the given predicate matches the current
* Creates a new [[akka.http.scaladsl.server.Directive0]], which passes if the given predicate matches the current
* extractions or rejects with the given rejections.
*/
def trequire(predicate: L Boolean, rejections: Rejection*): Directive0 =

View file

@ -10,7 +10,7 @@ import headers._
/**
* 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 [[spray.http.HttpResponse]]s by the
* up over the course of a Route evaluation and finally converted to [[akka.http.scaladsl.model.HttpResponse]]s by the
* `handleRejections` directive, if there was no way for the request to be completed.
*/
trait Rejection
@ -125,7 +125,7 @@ object UnacceptedResponseEncodingRejection {
}
/**
* Rejection created by an [[akka.http.scaladsl.server.authentication.HttpAuthenticator]].
* Rejection created by an [[akka.http.javadsl.server.values.HttpBasicAuthenticator]].
* Signals that the request was rejected because the user could not be authenticated. The reason for the rejection is
* specified in the cause.
*/

View file

@ -100,7 +100,7 @@ trait RequestContext {
def withRoutingSettings(settings: RoutingSettings): RequestContext
/**
* Returns a copy of this context with the new [[ParserSettings]].
* Returns a copy of this context with the new [[akka.http.scaladsl.settings.ParserSettings]].
*/
def withParserSettings(settings: ParserSettings): RequestContext

View file

@ -38,7 +38,7 @@ object Route {
/**
* Turns a `Route` into a server flow.
*
* This conversion is also implicitly available through [[RouteResult.route2HandlerFlow]].
* This conversion is also implicitly available through [[RouteResult#route2HandlerFlow]].
*/
def handlerFlow(route: Route)(implicit routingSettings: RoutingSettings,
parserSettings: ParserSettings,

View file

@ -131,35 +131,35 @@ trait BasicDirectives {
def extractUri: Directive1[Uri] = BasicDirectives._extractUri
/**
* Runs its inner route with the given alternative [[ExecutionContextExecutor]].
* Runs its inner route with the given alternative [[scala.concurrent.ExecutionContextExecutor]].
*/
def withExecutionContext(ec: ExecutionContextExecutor): Directive0 =
mapRequestContext(_ withExecutionContext ec)
/**
* Extracts the [[ExecutionContextExecutor]] from the [[RequestContext]].
* Extracts the [[scala.concurrent.ExecutionContextExecutor]] from the [[akka.http.scaladsl.server.RequestContext]].
*/
def extractExecutionContext: Directive1[ExecutionContextExecutor] = BasicDirectives._extractExecutionContext
/**
* Runs its inner route with the given alternative [[Materializer]].
* Runs its inner route with the given alternative [[akka.stream.Materializer]].
*/
def withMaterializer(materializer: Materializer): Directive0 =
mapRequestContext(_ withMaterializer materializer)
/**
* Extracts the [[Materializer]] from the [[RequestContext]].
* Extracts the [[akka.stream.Materializer]] from the [[akka.http.scaladsl.server.RequestContext]].
*/
def extractMaterializer: Directive1[Materializer] = BasicDirectives._extractMaterializer
/**
* Runs its inner route with the given alternative [[LoggingAdapter]].
* Runs its inner route with the given alternative [[akka.event.LoggingAdapter]].
*/
def withLog(log: LoggingAdapter): Directive0 =
mapRequestContext(_ withLog log)
/**
* Extracts the [[LoggingAdapter]] from the [[RequestContext]].
* Extracts the [[akka.event.LoggingAdapter]] from the [[akka.http.scaladsl.server.RequestContext]].
*/
def extractLog: Directive1[LoggingAdapter] =
BasicDirectives._extractLog
@ -177,19 +177,19 @@ trait BasicDirectives {
mapRequestContext(ctx ctx.withRoutingSettings(f(ctx.settings)))
/**
* Extracts the [[RoutingSettings]] from the [[RequestContext]].
* Extracts the [[RoutingSettings]] from the [[akka.http.scaladsl.server.RequestContext]].
*/
def extractSettings: Directive1[RoutingSettings] =
BasicDirectives._extractSettings
/**
* Extracts the [[akka.http.scaladsl.settings.ParserSettings]] from the [[RequestContext]].
* Extracts the [[akka.http.scaladsl.settings.ParserSettings]] from the [[akka.http.scaladsl.server.RequestContext]].
*/
def extractParserSettings: Directive1[ParserSettings] =
BasicDirectives._extractParserSettings
/**
* Extracts the [[RequestContext]] itself.
* Extracts the [[akka.http.scaladsl.server.RequestContext]] itself.
*/
def extractRequestContext: Directive1[RequestContext] = BasicDirectives._extractRequestContext
}

View file

@ -123,7 +123,7 @@ trait PathDirectives extends PathMatchers with ImplicitPathMatcherConstruction w
* }}}
*
* For further information, refer to:
* [[http://googlewebmastercentral.blogspot.de/2010/04/to-slash-or-not-to-slash.html]]
* @see [[http://googlewebmastercentral.blogspot.de/2010/04/to-slash-or-not-to-slash.html]]
*/
def pathEndOrSingleSlash: Directive0 = rawPathPrefix(Slash.? ~ PathEnd)

View file

@ -32,7 +32,7 @@ trait RangeDirectives {
* it on the *inside* of the `conditional(...)` directive, i.e. `conditional(...)` must be
* on a higher level in your route structure in order to function correctly.
*
* @see https://tools.ietf.org/html/rfc7233
* @see [[https://tools.ietf.org/html/rfc7233]]
*/
def withRangeSupport: Directive0 =
extractRequestContext.flatMap { ctx

View file

@ -22,8 +22,8 @@ import HttpCharsets._
import akka.stream.impl.fusing.SubSource
/**
* Provides [[Multipart]] marshallers.
* It is possible to configure the default parsing mode by providing an implicit [[ParserSettings]] instance.
* Provides [[akka.http.scaladsl.model.Multipart]] marshallers.
* It is possible to configure the default parsing mode by providing an implicit [[akka.http.scaladsl.settings.ParserSettings]] instance.
*/
trait MultipartUnmarshallers {