aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/core/rest
diff options
context:
space:
mode:
authorZach Smith <zach@driver.xyz>2017-10-17 14:42:39 -0700
committerZach Smith <zach@driver.xyz>2017-10-17 14:42:39 -0700
commit1aaaf7a5ecf2cd28350fff872e334f9f6186966a (patch)
treebb66e54c3f7ff26af279df255452566df057223b /src/main/scala/xyz/driver/core/rest
parentf1f4183bb7e40347e15347de87e06c1e1d854827 (diff)
downloaddriver-core-1aaaf7a5ecf2cd28350fff872e334f9f6186966a.tar.gz
driver-core-1aaaf7a5ecf2cd28350fff872e334f9f6186966a.tar.bz2
driver-core-1aaaf7a5ecf2cd28350fff872e334f9f6186966a.zip
Rename files containing multiple classes to lowercase
Diffstat (limited to 'src/main/scala/xyz/driver/core/rest')
-rw-r--r--src/main/scala/xyz/driver/core/rest/ServiceDiscovery.scala26
-rw-r--r--src/main/scala/xyz/driver/core/rest/serviceDiscovery.scala24
-rw-r--r--src/main/scala/xyz/driver/core/rest/serviceRequestContext.scala (renamed from src/main/scala/xyz/driver/core/rest/ServiceRequestContext.scala)0
3 files changed, 24 insertions, 26 deletions
diff --git a/src/main/scala/xyz/driver/core/rest/ServiceDiscovery.scala b/src/main/scala/xyz/driver/core/rest/ServiceDiscovery.scala
deleted file mode 100644
index 5f589a9..0000000
--- a/src/main/scala/xyz/driver/core/rest/ServiceDiscovery.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-package xyz.driver.core.rest
-
-import xyz.driver.core.Name
-
-trait ServiceDiscovery {
-
- def discover[T <: Service](serviceName: Name[Service]): T
-}
-
-object ServiceDiscovery {
- trait SavingUsedServiceDiscovery {
- private val usedServices = new scala.collection.mutable.HashSet[String]()
-
- def saveServiceUsage(serviceName: Name[Service]): Unit = usedServices.synchronized {
- usedServices += serviceName.value
- }
-
- def getUsedServices: Set[String] = usedServices.synchronized { usedServices.toSet }
- }
-
- class NoServiceDiscovery extends ServiceDiscovery with SavingUsedServiceDiscovery {
-
- def discover[T <: Service](serviceName: Name[Service]): T =
- throw new IllegalArgumentException(s"Service with name $serviceName is unknown")
- }
-}
diff --git a/src/main/scala/xyz/driver/core/rest/serviceDiscovery.scala b/src/main/scala/xyz/driver/core/rest/serviceDiscovery.scala
new file mode 100644
index 0000000..55f1a2e
--- /dev/null
+++ b/src/main/scala/xyz/driver/core/rest/serviceDiscovery.scala
@@ -0,0 +1,24 @@
+package xyz.driver.core.rest
+
+import xyz.driver.core.Name
+
+trait ServiceDiscovery {
+
+ def discover[T <: Service](serviceName: Name[Service]): T
+}
+
+trait SavingUsedServiceDiscovery {
+ private val usedServices = new scala.collection.mutable.HashSet[String]()
+
+ def saveServiceUsage(serviceName: Name[Service]): Unit = usedServices.synchronized {
+ usedServices += serviceName.value
+ }
+
+ def getUsedServices: Set[String] = usedServices.synchronized { usedServices.toSet }
+}
+
+class NoServiceDiscovery extends ServiceDiscovery with SavingUsedServiceDiscovery {
+
+ def discover[T <: Service](serviceName: Name[Service]): T =
+ throw new IllegalArgumentException(s"Service with name $serviceName is unknown")
+}
diff --git a/src/main/scala/xyz/driver/core/rest/ServiceRequestContext.scala b/src/main/scala/xyz/driver/core/rest/serviceRequestContext.scala
index 4020d57..4020d57 100644
--- a/src/main/scala/xyz/driver/core/rest/ServiceRequestContext.scala
+++ b/src/main/scala/xyz/driver/core/rest/serviceRequestContext.scala