Merge commit 'remotes/origin/master' into 224-krasserm
This commit is contained in:
commit
71eb77332f
3 changed files with 33 additions and 30 deletions
|
|
@ -16,11 +16,11 @@ case class ClusterCometBroadcast(name: String, msg: AnyRef) extends ClusterComet
|
|||
* Enables explicit clustering of Atmosphere (Comet) resources
|
||||
* Annotate the endpoint which has the @Broadcast annotation with
|
||||
* @org.atmosphere.annotation.Cluster(Array(classOf[AkkClusterBroadcastFilter])){ name = "someUniqueName" }
|
||||
* that's all folks!
|
||||
* thats all folks!
|
||||
* Note: In the future, clustering comet will be transparent
|
||||
*/
|
||||
|
||||
class AkkaClusterBroadcastFilter extends Actor with ClusterBroadcastFilter[AnyRef] {
|
||||
class AkkaClusterBroadcastFilter extends Actor with ClusterBroadcastFilter {
|
||||
@BeanProperty var clusterName = ""
|
||||
@BeanProperty var broadcaster : Broadcaster = null
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ class AtmosphereRestServlet extends ServletContainer with AtmosphereServletProce
|
|||
private val handler = new AbstractReflectorAtmosphereHandler {
|
||||
override def onRequest(event: AtmosphereResource[HttpServletRequest, HttpServletResponse]) {
|
||||
if (event ne null) {
|
||||
event.getRequest.setAttribute(ReflectorServletProcessor.ATMOSPHERE_RESOURCE, event)
|
||||
event.getRequest.setAttribute(ReflectorServletProcessor.ATMOSPHERE_HANDLER, this)
|
||||
event.getRequest.setAttribute(AtmosphereServlet.ATMOSPHERE_RESOURCE, event)
|
||||
event.getRequest.setAttribute(AtmosphereServlet.ATMOSPHERE_HANDLER, this)
|
||||
service(event.getRequest, event.getResponse)
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,10 @@ class AtmosphereRestServlet extends ServletContainer with AtmosphereServletProce
|
|||
* <p/>
|
||||
* Used by the Akka Kernel to bootstrap REST and Comet.
|
||||
*/
|
||||
class AkkaServlet extends org.atmosphere.cpr.AtmosphereServlet with Logging {
|
||||
class AkkaServlet extends AtmosphereServlet with Logging {
|
||||
addInitParameter(AtmosphereServlet.DISABLE_ONSTATE_EVENT,"true")
|
||||
addInitParameter(AtmosphereServlet.BROADCASTER_CLASS,classOf[AkkaBroadcaster].getName)
|
||||
|
||||
lazy val servlet = createRestServlet
|
||||
|
||||
protected def createRestServlet : AtmosphereRestServlet = new AtmosphereRestServlet {
|
||||
|
|
@ -53,9 +56,9 @@ class AkkaServlet extends org.atmosphere.cpr.AtmosphereServlet with Logging {
|
|||
* Instead we specify what semantics we want in code.
|
||||
*/
|
||||
override def loadConfiguration(sc: ServletConfig) {
|
||||
config = new AtmosphereConfig { supportSession = false }
|
||||
setDefaultBroadcasterClassName(classOf[AkkaBroadcaster].getName)
|
||||
atmosphereHandlers.put("/*", new AtmosphereServlet.AtmosphereHandlerWrapper(servlet, new AkkaBroadcaster))
|
||||
config.setSupportSession(false)
|
||||
isBroadcasterSpecified = true
|
||||
addAtmosphereHandler("/*", servlet, new AkkaBroadcaster)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -47,29 +47,29 @@ class AkkaLoader extends Logging {
|
|||
private def printBanner = {
|
||||
log.info(
|
||||
"""
|
||||
t
|
||||
t t t
|
||||
t t tt t
|
||||
tt t t tt t
|
||||
t ttttttt t ttt t
|
||||
t tt ttt t ttt t
|
||||
t t ttt t ttt t t
|
||||
tt t ttt ttt ttt t
|
||||
t t ttt ttt t tt t
|
||||
t ttt ttt t t
|
||||
tt ttt ttt t
|
||||
ttt ttt
|
||||
tttttttt ttt ttt ttt ttt tttttttt
|
||||
ttt tt ttt ttt ttt ttt ttt ttt
|
||||
ttt ttt ttt ttt ttt ttt ttt ttt
|
||||
ttt ttt ttt ttt ttt tt ttt ttt
|
||||
tttt ttttttttt tttttttt tttt
|
||||
ttttttttt ttt ttt ttt ttt ttttttttt
|
||||
ttt ttt ttt ttt ttt ttt ttt ttt
|
||||
ttt ttt ttt ttt ttt ttt ttt ttt
|
||||
ttt tt ttt ttt ttt ttt ttt ttt
|
||||
t
|
||||
t t t
|
||||
t t tt t
|
||||
tt t t tt t
|
||||
t ttttttt t ttt t
|
||||
t tt ttt t ttt t
|
||||
t t ttt t ttt t t
|
||||
tt t ttt ttt ttt t
|
||||
t t ttt ttt t tt t
|
||||
t ttt ttt t t
|
||||
tt ttt ttt t
|
||||
ttt ttt
|
||||
tttttttt ttt ttt ttt ttt tttttttt
|
||||
|
||||
ttt tt ttt ttt ttt ttt ttt ttt
|
||||
ttt ttt ttt ttt ttt ttt ttt ttt
|
||||
ttt ttt ttt ttt ttt tt ttt ttt
|
||||
tttt ttttttttt tttttttt tttt
|
||||
ttttttttt ttt ttt ttt ttt ttttttttt
|
||||
ttt ttt ttt ttt ttt ttt ttt ttt
|
||||
ttt ttt ttt ttt ttt ttt ttt ttt
|
||||
ttt tt ttt ttt ttt ttt ttt ttt
|
||||
tttttttt ttt ttt ttt ttt tttttttt
|
||||
|
||||
==================================================
|
||||
""")
|
||||
log.info(" Running version %s", Config.VERSION)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue