net.liftweb.http.CometActor

trait CometActor

trait CometActor

 extends LiftActor with LiftCometActor with BindHelpers


Takes care of the plumbing for building Comet-based Web Apps


Source: CometActor.scala(263)

Direct Known Subclasses

AsyncRenderComet, CometListenee, StatefulComet,

 Fields

aroundLoans.. protected def aroundLoans List[CommonLoanWrapper] SpecializedLiftActor
attributes.. def attributes Map[String, String]
autoIncludeJsonCode.. def autoIncludeJsonCode
Set this method to true to have the Json call code included in the Comet output
Boolean
composeFunction.. protected def composeFunction PartialFunction[Any, Unit]
defaultPrefix.. def defaultPrefix Box[String]
defaultXml.. def defaultXml NodeSeq
devMode.. protected def devMode
Set to 'true' if we should run "render" on every page load
Boolean
exceptionHandler.. protected def exceptionHandler PartialFunction[Throwable, Unit] SpecializedLiftActor
fixedRender.. def fixedRender Box[NodeSeq]
hasOuter.. def hasOuter Boolean
highPriority.. def highPriority PartialFunction[Any, Unit]
highPriorityReceive.. protected def highPriorityReceive Box[PartialFunction[T, Unit]] SpecializedLiftActor
jsonCall.. lazy val jsonCall JsonCall
jsonInCode.. lazy val jsonInCode JsCmd
jsonSend.. def jsonSend
The JavaScript call that you use to send the data to the server [details]
For example: <button onclick={jsonSend("Hello", JsRaw("Dude".encJs))}>Click</button>
JsonCall
jsonToIncludeInCode.. def jsonToIncludeInCode
The call that packages up the JSON and tosses it to the server [details]
If you set autoIncludeJsonCode to true, then this will be included in the stuff sent to the server.
JsCmd
lifespan.. def lifespan Box[TimeSpan]
lowPriority.. def lowPriority PartialFunction[Any, Unit]
mediumPriority.. def mediumPriority PartialFunction[Any, Unit]
messageHandler.. def messageHandler PartialFunction[Any, Unit]
name.. def name Box[String]
onJsonError.. def onJsonError
If there's actor-specific JSON behavior on failure to make the JSON call, include the JavaScript here
Box[JsCmd]
parentTag.. def parentTag Elem
receiveJson.. def receiveJson
Override this method to deal with JSON sent from the browser via the sendJson function [details]
This is based on the Lift JSON package rather than the handleJson stuff based on the older util.JsonParser. This is the prefered mechanism. If you use the jsonSend call, you will get a JObject(JField("command", cmd), JField("param", params))
PartialFunction[JValue, JsCmd]
render.. abstract def render
It's the main method to override, to define what is rendered by the CometActor There are implicit conversions for a bunch of stuff to RenderOut (including NodeSeq) [details]
Thus, if you don't declare the return turn to be something other than RenderOut and return something that's coersable into RenderOut, the compiler "does the right thing"(tm) for you.
RenderOut
running.. protected def running
Is the CometActor running?
Boolean
theSession.. def theSession LiftSession
theType.. def theType Box[String]
uniqueId.. val uniqueId String

 Methods

!.. def !(arg0 : T) Unit SpecializedLiftActor
!!.. def !!(arg0 : Any, arg1 : Long) Box[Any] LiftActor
!!.. def !!(arg0 : Any) Box[Any] LiftActor
!<.. def !<(arg0 : Any) LAFuture[Any] LiftActor
!=.. final def !=(arg0 : Object) Boolean AnyRef
!=.. final def !=(arg0 : Any) Boolean Any
!?.. def !?(arg0 : Any) Any LiftActor
!?.. def !?(arg0 : Long, arg1 : Any) Box[Any] LiftActor
==.. final def ==(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Object) Boolean AnyRef
answer.. protected def answer(answer : Any) Unit
appendJsonHandler.. def appendJsonHandler(h : PartialFunction[Any, JsCmd])
Prepends the handler to the Json Handlers [details]
Should only be used during instantiation
param
h - -- the PartialFunction that can handle a JSON request
Unit
around.. protected def around[R](arg0 : => R) R SpecializedLiftActor
asInstanceOf.. final def asInstanceOf[T0] T0 Any
ask.. protected def ask(who : LiftCometActor, what : Any)(answerWith : (Any) => Unit) Unit
bind.. def bind(arg0 : String, arg1 : Box[(NodeSeq) => NodeSeq], arg2 : Box[(PrefixedAttribute) => MetaData], arg3 : Boolean, arg4 : NodeSeq, arg5 : BindParam*) NodeSeq BindHelpers
bind.. def bind(vals : BindParam*) NodeSeq
bind.. def bind(arg0 : String, arg1 : NodeSeq, arg2 : BindParam*) NodeSeq BindHelpers
bind.. def bind(arg0 : String, arg1 : Box[(NodeSeq) => NodeSeq], arg2 : Box[(PrefixedAttribute) => MetaData], arg3 : NodeSeq, arg4 : BindParam*) NodeSeq BindHelpers
bind.. def bind(prefix : String, vals : BindParam*) NodeSeq
bind.. def bind(arg0 : Map[String, NodeSeq], arg1 : NodeSeq) NodeSeq BindHelpers
bindlist.. def bindlist(arg0 : List[Map[String, NodeSeq]], arg1 : NodeSeq) Box[NodeSeq] BindHelpers
buildSpan.. def buildSpan(time : Long, xml : NodeSeq)
Creates the span element acting as the real estate for commet rendering
NodeSeq
chooseTemplate.. def chooseTemplate(arg0 : String, arg1 : String, arg2 : NodeSeq) NodeSeq BindHelpers
clone.. protected def clone Object AnyRef
elemToFull.. implicit def elemToFull(in : Elem) Box[NodeSeq]
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
error.. def error(n : String)
Similar with S [details]
error
Unit
error.. def error(id : String, n : NodeSeq)
Similar with S [details]
error
Unit
error.. def error(id : String, n : String)
Similar with S [details]
error
Unit
error.. def error(n : NodeSeq)
Similar with S [details]
error
Unit
execTranslate.. protected override def execTranslate(arg0 : (Any) => Unit) Unit LiftActor
finalize.. protected def finalize Unit AnyRef
findNode.. def findNode(arg0 : Elem, arg1 : NodeSeq) Box[Elem] BindHelpers
forwardMessageTo.. protected final def forwardMessageTo(arg0 : Any, arg1 : TypedActor[Any, Any]) Unit LiftActor
getClass.. final def getClass Class[Any] AnyRef
handleJson.. def handleJson(in : Any) JsCmd
hashCode.. def hashCode Int AnyRef
initCometActor.. protected def initCometActor(theSession : LiftSession, theType : Box[String], name : Box[String], defaultXml : NodeSeq, attributes : Map[String, String]) Unit
insertMsgAtHeadOfQueue_!.. protected def insertMsgAtHeadOfQueue_!(arg0 : T) Unit SpecializedLiftActor
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
jsToXmlOrJsCmd.. implicit def jsToXmlOrJsCmd(in : JsCmd) RenderOut
localSetup.. protected def localSetup
This method will be called after the Actor has started [details]
Do any setup here
Unit
localShutdown.. protected def localShutdown
This method will be called as part of the shut-down of the actor [details]
Release any resources here.
Unit
mixinAttributes.. def mixinAttributes(arg0 : Elem) NodeSeq BindHelpers
ne.. final def ne(arg0 : Object) Boolean AnyRef
nodeSeqToFull.. implicit def nodeSeqToFull(in : NodeSeq) Box[NodeSeq]
notice.. def notice(n : String)
Similar with S [details]
notice
Unit
notice.. def notice(id : String, n : NodeSeq)
Similar with S [details]
notice
Unit
notice.. def notice(id : String, n : String)
Similar with S [details]
notice
Unit
notice.. def notice(n : NodeSeq)
Similar with S [details]
notice
Unit
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
pairToPair.. implicit def pairToPair(in : (String, Any)) (String, NodeSeq)
partialUpdate.. protected def partialUpdate(cmd : => JsCmd) Unit
processBind.. def processBind(arg0 : NodeSeq, arg1 : Map[String, NodeSeq]) NodeSeq BindHelpers
reRender.. def reRender(sendAll : Boolean) Unit
reply.. protected def reply(arg0 : Any) Unit LiftActor
startQuestion.. protected def startQuestion(what : Any) Unit
strToBPAssoc.. implicit def strToBPAssoc(arg0 : String) BindParamAssoc BindHelpers
strToSuperArrowAssoc.. implicit def strToSuperArrowAssoc(arg0 : String) SuperArrowAssoc BindHelpers
stripHead.. def stripHead(arg0 : NodeSeq) NodeSeq BindHelpers
symToBPAssoc.. implicit def symToBPAssoc(arg0 : Symbol) BindParamAssoc BindHelpers
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
template.. def template(arg0 : NodeSeq, arg1 : String, arg2 : String, arg3 : String, arg4 : String) Box[(NodeSeq, NodeSeq, NodeSeq)] BindHelpers
template.. def template(arg0 : NodeSeq, arg1 : String, arg2 : String) Box[NodeSeq] BindHelpers
template.. def template(arg0 : NodeSeq, arg1 : String, arg2 : String, arg3 : String) Box[(NodeSeq, NodeSeq)] BindHelpers
testTranslate.. protected override def testTranslate(arg0 : (Any) => Boolean) Boolean LiftActor
toString.. def toString String AnyRef
unWatch.. def unWatch Unit
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait.. final def wait Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
warning.. def warning(n : String)
Similar with S [details]
warning
Unit
warning.. def warning(id : String, n : NodeSeq)
Similar with S [details]
warning
Unit
warning.. def warning(id : String, n : String)
Similar with S [details]
warning
Unit
warning.. def warning(n : NodeSeq)
Similar with S [details]
warning
Unit
xbind.. def xbind(arg0 : String, arg1 : NodeSeq) NodeSeq BindHelpers
xmlParam.. def xmlParam(arg0 : NodeSeq, arg1 : String) Box[String] BindHelpers
xmlToXmlOrJsCmd.. implicit def xmlToXmlOrJsCmd(in : NodeSeq) RenderOut
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.