forked from akka/akka-http
/
RoutingSettings.scala
48 lines (42 loc) · 2.46 KB
/
RoutingSettings.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Copyright (C) 2017-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package akka.http.scaladsl.settings
import akka.annotation.DoNotInherit
import akka.http.impl.settings.RoutingSettingsImpl
import com.typesafe.config.Config
/**
* Public API but not intended for subclassing
*/
@DoNotInherit
abstract class RoutingSettings private[akka] () extends akka.http.javadsl.settings.RoutingSettings { self: RoutingSettingsImpl ⇒
def verboseErrorMessages: Boolean
def fileGetConditional: Boolean
def renderVanityFooter: Boolean
def rangeCountLimit: Int
def rangeCoalescingThreshold: Long
def decodeMaxBytesPerChunk: Int
def decodeMaxSize: Long
def fileIODispatcher: String
/* Java APIs */
def getVerboseErrorMessages: Boolean = verboseErrorMessages
def getFileGetConditional: Boolean = fileGetConditional
def getRenderVanityFooter: Boolean = renderVanityFooter
def getRangeCountLimit: Int = rangeCountLimit
def getRangeCoalescingThreshold: Long = rangeCoalescingThreshold
def getDecodeMaxBytesPerChunk: Int = decodeMaxBytesPerChunk
def getDecodeMaxSize: Long = decodeMaxSize
def getFileIODispatcher: String = fileIODispatcher
override def withVerboseErrorMessages(verboseErrorMessages: Boolean): RoutingSettings = self.copy(verboseErrorMessages = verboseErrorMessages)
override def withFileGetConditional(fileGetConditional: Boolean): RoutingSettings = self.copy(fileGetConditional = fileGetConditional)
override def withRenderVanityFooter(renderVanityFooter: Boolean): RoutingSettings = self.copy(renderVanityFooter = renderVanityFooter)
override def withRangeCountLimit(rangeCountLimit: Int): RoutingSettings = self.copy(rangeCountLimit = rangeCountLimit)
override def withRangeCoalescingThreshold(rangeCoalescingThreshold: Long): RoutingSettings = self.copy(rangeCoalescingThreshold = rangeCoalescingThreshold)
override def withDecodeMaxBytesPerChunk(decodeMaxBytesPerChunk: Int): RoutingSettings = self.copy(decodeMaxBytesPerChunk = decodeMaxBytesPerChunk)
override def withDecodeMaxSize(decodeMaxSize: Long): RoutingSettings = self.copy(decodeMaxSize = decodeMaxSize)
override def withFileIODispatcher(fileIODispatcher: String): RoutingSettings = self.copy(fileIODispatcher = fileIODispatcher)
}
object RoutingSettings extends SettingsCompanion[RoutingSettings] {
override def apply(config: Config): RoutingSettings = RoutingSettingsImpl(config)
override def apply(configOverrides: String): RoutingSettings = RoutingSettingsImpl(configOverrides)
}