Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#SCL-10624 fixed #SCL-8827 fixed #SCL-9877 fixed
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
object Holder { | ||
|
||
object ActorMaterializer { | ||
|
||
def apply()(implicit context: ActorRefFactory): ActorMaterializer = ??? | ||
} | ||
|
||
trait Materializer | ||
|
||
abstract class ActorMaterializer extends Materializer | ||
|
||
class ActorMaterializerSettings | ||
|
||
trait ActorRefFactory | ||
|
||
case class ActorSystem(s: String) extends ActorRefFactory | ||
|
||
class Route | ||
|
||
class Flow | ||
|
||
implicit def route2HandlerFlow(route: Route) | ||
(implicit routingSettings: RoutingSettings, materializer: Materializer): Flow = ??? | ||
|
||
trait SettingsCompanion[T] { | ||
implicit def default(implicit system: ActorRefFactory): T = ??? | ||
} | ||
|
||
object RoutingSettings extends SettingsCompanion[RoutingSettings] | ||
|
||
abstract class RoutingSettings | ||
} | ||
|
||
object Test { | ||
|
||
import scala.concurrent.ExecutionContext | ||
import Holder._ | ||
|
||
def bindAndHandle(handler: Flow, interface: String, port: Int) | ||
(implicit fm: Materializer): Any = ??? | ||
|
||
def main(args: Array[String]) { | ||
implicit val system = ActorSystem("foo") | ||
implicit val materializer = ActorMaterializer() | ||
implicit val executionContext: ExecutionContext = ??? | ||
|
||
val route: Route = ??? | ||
|
||
val bindingFuture = bindAndHandle(/*start*/route/*end*/, "localhost", 8080) | ||
} | ||
} | ||
//Holder.Flow |