simplify structure of Deployer
- remove unused ActorDeployer trait - put everything in one class with simple initialization structure and one protected method to override for adaptations - adapt RemoteDeployer accordingly - change “remote” key to directly contain the single remote address, since there is nothing else to configure - adapt test cases accordingly
This commit is contained in:
parent
8540c70f18
commit
4f643eaa1b
8 changed files with 85 additions and 445 deletions
|
|
@ -29,6 +29,19 @@ object RemoteAddress {
|
|||
case RE(sys, host, Int(port)) ⇒ apply(if (sys != null) sys else defaultSystem, host, port)
|
||||
case _ ⇒ throw new IllegalArgumentException(stringRep + " is not a valid remote address [system@host:port]")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object RemoteAddressExtractor {
|
||||
def unapply(s: String): Option[RemoteAddress] = {
|
||||
try {
|
||||
val uri = new URI("akka://" + s)
|
||||
if (uri.getScheme != "akka" || uri.getUserInfo == null || uri.getHost == null || uri.getPort == -1) None
|
||||
else Some(RemoteAddress(uri.getUserInfo, uri.getHost, uri.getPort))
|
||||
} catch {
|
||||
case _: URISyntaxException ⇒ None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case class RemoteAddress(system: String, host: String, ip: InetAddress, port: Int) extends Address {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue