Rewritten "home" address management and protocol, all test pass except 2
This commit is contained in:
parent
dfc45e0a71
commit
f7407d3adf
61 changed files with 668 additions and 866 deletions
|
|
@ -24,10 +24,10 @@ class AkkaClusterBroadcastFilter extends Actor with ClusterBroadcastFilter[AnyRe
|
|||
@BeanProperty var clusterName = ""
|
||||
@BeanProperty var broadcaster : Broadcaster = null
|
||||
|
||||
override def init : Unit = ()
|
||||
|
||||
/** Stops the actor */
|
||||
def destroy : Unit = stop
|
||||
/**
|
||||
* Stops the actor
|
||||
*/
|
||||
def destroy: Unit = self.stop
|
||||
|
||||
/**
|
||||
* Relays all non ClusterCometBroadcast messages to the other AkkaClusterBroadcastFilters in the cluster
|
||||
|
|
@ -45,10 +45,10 @@ class AkkaClusterBroadcastFilter extends Actor with ClusterBroadcastFilter[AnyRe
|
|||
|
||||
def receive = {
|
||||
//Only handle messages intended for this particular instance
|
||||
case b@ClusterCometBroadcast(c,_) if (c == clusterName) && (broadcaster ne null) => broadcaster broadcast b
|
||||
case b @ ClusterCometBroadcast(c, _) if (c == clusterName) && (broadcaster ne null) => broadcaster broadcast b
|
||||
case _ =>
|
||||
}
|
||||
|
||||
//Since this class is instantiated by Atmosphere, we need to make sure it's started
|
||||
start
|
||||
self.start
|
||||
}
|
||||
|
|
@ -192,10 +192,10 @@ trait AuthenticationActor[C <: Credentials] extends Actor {
|
|||
verify(extractCredentials(req)) match {
|
||||
case Some(u: UserInfo) => {
|
||||
req.setSecurityContext(mkSecurityContext(req, u))
|
||||
if (roles.exists(req.isUserInRole(_))) reply(OK)
|
||||
else reply(Response.status(Response.Status.FORBIDDEN).build)
|
||||
if (roles.exists(req.isUserInRole(_))) self.reply(OK)
|
||||
else self.reply(Response.status(Response.Status.FORBIDDEN).build)
|
||||
}
|
||||
case _ => reply(unauthorized)
|
||||
case _ => self.reply(unauthorized)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue