trait NamedCometActorTrait extends BaseCometActor with Loggable
- Alphabetic
- By Inheritance
- NamedCometActorTrait
- Loggable
- BaseCometActor
- CssBindImplicits
- LiftCometActor
- Dependent
- LiftActor
- ForwardableActor
- GenericActor
- TypedActor
- SpecializedLiftActor
- SimpleActor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Abstract Value Members
- abstract def render: RenderOut
It's the main method to override, to define what is rendered by the CometActor
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). Thus, if you don't declare the return turn to be something other than RenderOut and return something that's coercible into RenderOut, the compiler "does the right thing"(tm) for you.
There are implicit conversions for NodeSeq, so you can return a pile of XML right here. There's an implicit conversion for NodeSeq => NodeSeq, so you can return a function (e.g., a CssBindFunc) that will convert the defaultHtml to the correct output. There's an implicit conversion from JsCmd, so you can return a pile of JavaScript that'll be shipped to the browser.
Note that the render method will be called each time a new browser tab is opened to the comet component or the comet component is otherwise accessed during a full page load (this is true if a partialUpdate has occurred.) You may want to look at the fixedRender method which is only called once and sets up a stable rendering state.- Definition Classes
- BaseCometActor
Concrete Value Members
- def !(msg: Any): Unit
- Definition Classes
- SpecializedLiftActor → SimpleActor
- def !!(msg: Any): Box[Any]
- Definition Classes
- LiftActor → TypedActor
- def !!(msg: Any, timeout: Long): Box[Any]
- Definition Classes
- LiftActor → TypedActor
- def !<(msg: Any): LAFuture[Any]
- Definition Classes
- LiftActor
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def !?(timeout: Long, message: Any): Box[Any]
- Definition Classes
- LiftActor → TypedActor
- def !?(msg: Any): Any
- Definition Classes
- LiftActor → TypedActor
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def alwaysReRenderOnPageLoad: Boolean
Set to 'true' if we should run "render" on every page load
Set to 'true' if we should run "render" on every page load
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def answer(answer: Any): Unit
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def appendJsonHandler(h: PartialFunction[Any, JsCmd]): Unit
Prepends the handler to the Json Handlers.
Prepends the handler to the Json Handlers. Should only be used during instantiation
- h
-- the PartialFunction that can handle a JSON request
- Definition Classes
- BaseCometActor
- def around[R](f: => R): R
- Attributes
- protected
- Definition Classes
- SpecializedLiftActor
- def aroundLoans: List[CommonLoanWrapper]
- Attributes
- protected
- Definition Classes
- SpecializedLiftActor
- implicit def arrayToRenderOut(in: Seq[Node]): RenderOut
Convert a Seq[Node] (the superclass of NodeSeq) to a RenderOut.
Convert a Seq[Node] (the superclass of NodeSeq) to a RenderOut. The render method returns a RenderOut. This method implicitly (in Scala) or explicitly (in Java) will convert a NodeSeq to a RenderOut. This is helpful if you return a NodeSeq from your render method.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def ask(who: LiftCometActor, what: Any)(answerWith: (Any) => Unit): Unit
Ask another CometActor a question.
Ask another CometActor a question. That other CometActor will take over the screen real estate until the question is answered.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def attributes: Map[String, String]
- Definition Classes
- BaseCometActor
- def autoIncludeJsonCode: Boolean
Set this method to true to have the Json call code included in the Comet output
Set this method to true to have the Json call code included in the Comet output
- Definition Classes
- BaseCometActor
- def buildSpan(xml: NodeSeq): Elem
Creates the span element acting as the real estate for comet rendering.
Creates the span element acting as the real estate for comet rendering.
- Definition Classes
- BaseCometActor → LiftCometActor
- def cacheFixedRender: Boolean
By default, we do not cache the value of fixedRender.
By default, we do not cache the value of fixedRender. If it's expensive to recompute it each time there's a conversion of something to a RenderOut, override this method if you want to cache fixedRender.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def calcFixedRender: Box[NodeSeq]
Calculate fixedRender and capture the postpage javascript
Calculate fixedRender and capture the postpage javascript
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def captureInitialReq(initialReq: Box[Req]): Unit
Comet Actors live outside the HTTP request/response cycle.
Comet Actors live outside the HTTP request/response cycle. However, it may be useful to know what Request led to the creation of the CometActor. You can override this method and capture the initial Req object. Note that keeping a reference to the Req may lead to memory retention issues if the Req contains large message bodies, etc. It's optimal to capture the path or capture any request parameters that you care about rather the keeping the whole Req reference.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def clearWiringDependencies(): Unit
Clear the common dependencies for Wiring.
Clear the common dependencies for Wiring. This method will clearPostPageJavaScriptForThisPage() and unregisterFromAllDependencies(). The combination will result in a clean slate for Wiring during a redraw. You can change the behavior of the wiring dependency management by overriding this method
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def cometActorLocale: Locale
The locale for the session that created the CometActor
The locale for the session that created the CometActor
- Definition Classes
- LiftCometActor
- def cometListeners: List[ListenerId]
Return the list of ListenerIds of all long poll agents that are waiting for this CometActor to change its state.
Return the list of ListenerIds of all long poll agents that are waiting for this CometActor to change its state. This method is useful for detecting presence.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def cometProcessingTimeout: Long
Override in sub-class to customise timeout for AJAX-requests to the comet-component for the specific comet
Override in sub-class to customise timeout for AJAX-requests to the comet-component for the specific comet
- Definition Classes
- LiftCometActor
- def cometProcessingTimeoutHandler(): JsCmd
This is to react to comet-requests timing out.
This is to react to comet-requests timing out. When the timeout specified in
LiftRules#cometProcessingTimeoutoccurs one may override this to send a message to the user informing of the timeout.Do NOT manipulate actor-state here. If you want to manipulate state, send the actor a new message.
Typical example would be:
override def cometTimeoutHandler(): JsCmd = { Alert("Timeout processing comet-request, timeout is: " + cometProcessingTimeout + "ms") }- Definition Classes
- LiftCometActor
- def cometRenderTimeout: Long
Override in sub-class to customise timeout for the render()-method for the specific comet
Override in sub-class to customise timeout for the render()-method for the specific comet
- Definition Classes
- LiftCometActor
- def cometRenderTimeoutHandler(): Box[NodeSeq]
This is to react to comet-actors timing out while initial rendering, calls to render().
This is to react to comet-actors timing out while initial rendering, calls to render(). When the timeout specified in
LiftRules#cometRenderTimeoutoccurs one may override this to customise the output.Do NOT manipulate actor-state here. If you want to manipulate state, send the actor a new message.
Typical example would be:
override def renderTimeoutHandler(): Box[NodeSeq] = { Full(<div>Comet {this.getClass} timed out, timeout is {cometRenderTimeout}ms</div>) }- Definition Classes
- LiftCometActor
- def composeFunction: PartialFunction[Any, Unit]
Compose the Message Handler function.
Compose the Message Handler function. By default, composes highPriority orElse mediumPriority orElse internalHandler orElse lowPriority orElse internalHandler. But you can change how the handler works if doing stuff in highPriority, mediumPriority and lowPriority is not enough.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def defaultHtml: NodeSeq
The template that was passed to this component during comet initializations
The template that was passed to this component during comet initializations
- Definition Classes
- BaseCometActor
- def defaultPrefix: Box[String]
- Definition Classes
- BaseCometActor
- def dontCacheRendering: Boolean
Set this method to true if you want to avoid caching the rendering.
Set this method to true if you want to avoid caching the rendering. This trades space for time.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- implicit def elemToFull(in: Elem): Box[NodeSeq]
- Definition Classes
- BaseCometActor
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def error(id: String, n: String): Unit
Similar with S.error
Similar with S.error
- Definition Classes
- BaseCometActor
- def error(id: String, n: NodeSeq): Unit
Similar with S.error
Similar with S.error
- Definition Classes
- BaseCometActor
- def error(n: NodeSeq): Unit
Similar with S.error
Similar with S.error
- Definition Classes
- BaseCometActor
- def error(n: String): Unit
Similar with S.error
Similar with S.error
- Definition Classes
- BaseCometActor
- def exceptionHandler: PartialFunction[Throwable, Unit]
By default,
CometActorhandlesRedirectShortcutException, which is used to handle many types of redirects in Lift.By default,
CometActorhandlesRedirectShortcutException, which is used to handle many types of redirects in Lift. If you override thisPartialFunctionto do your own exception handling and want redirects from e.g.S.redirectToto continue working correctly, make sure you chain back to this implementation.- Definition Classes
- BaseCometActor → SpecializedLiftActor
- def execTranslate(f: (Any) => Unit)(v: Any): Unit
- Attributes
- protected
- Definition Classes
- LiftActor → SpecializedLiftActor
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fixedRender: Box[NodeSeq]
A part of the CometActor's screen real estate that is not updated by default with reRender().
A part of the CometActor's screen real estate that is not updated by default with reRender(). This block of HTML is useful for the editor part of a Comet-based control where the data is JSON and updated with partialUpdates.
- Definition Classes
- BaseCometActor
- final def forwardMessageTo(msg: Any, forwardTo: TypedActor[Any, Any]): Unit
- Attributes
- protected
- Definition Classes
- LiftActor → ForwardableActor
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasOuter: Boolean
- Definition Classes
- BaseCometActor → LiftCometActor
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def highPriority: PartialFunction[Any, Unit]
Handle messages sent to this Actor before the
Handle messages sent to this Actor before the
- Definition Classes
- BaseCometActor
- def highPriorityReceive: Box[PartialFunction[Any, Unit]]
- Attributes
- protected
- Definition Classes
- SpecializedLiftActor
- def initCometActor(creationInfo: CometCreationInfo): Unit
It's seriously suboptimal to override this method.
It's seriously suboptimal to override this method. Instead use localSetup()
- Attributes
- protected
- Definition Classes
- BaseCometActor → LiftCometActor
- def insertMsgAtHeadOfQueue_!(msg: Any): Unit
- Attributes
- protected
- Definition Classes
- SpecializedLiftActor
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def jsToXmlOrJsCmd(in: JsCmd): RenderOut
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def jsonSend: JsonCall
The JavaScript call that you use to send the data to the server.
The JavaScript call that you use to send the data to the server. For example: <button onclick={jsonSend("Hello", JsRaw("Dude".encJs))}>Click</button>
- Definition Classes
- BaseCometActor
- def jsonToIncludeInCode: JsCmd
The call that packages up the JSON and tosses it to the server.
The call that packages up the JSON and tosses it to the server. If you set autoIncludeJsonCode to true, then this will be included in the stuff sent to the server.
- Definition Classes
- BaseCometActor
- def lastListenerTime: Long
The last "when" sent from the listener
The last "when" sent from the listener
- returns
the last when sent from the listener
- Definition Classes
- BaseCometActor → LiftCometActor
- def lastRenderTime: Long
- Definition Classes
- BaseCometActor → LiftCometActor
- def lifespan: Full[util.Helpers.TimeSpan]
The lifespan of this component.
The lifespan of this component. By default CometActors will last for the entire session that they were created in, even if the CometActor is not currently visible. You can set the lifespan of the CometActor. If the CometActor isn't visible on any page for some period after its lifespan the CometActor will be shut down.
- Definition Classes
- NamedCometActorTrait → BaseCometActor
- def listenerTransition(): Unit
This method will be called when there's a change in the long poll listeners.
This method will be called when there's a change in the long poll listeners. The method does nothing, but allows you to get a granular sense of how many browsers care about this CometActor. Note that this method should not block for any material time and if there's any processing to do, use Scheduler.schedule or send a message to this CometActor. Do not change the Actor's state from this method.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def localSetup(): Unit
First thing we do is registering this comet actor for the "name" key
First thing we do is registering this comet actor for the "name" key
- Definition Classes
- NamedCometActorTrait → BaseCometActor
- def localShutdown(): Unit
We remove the CometActor from the map of registered actors
We remove the CometActor from the map of registered actors
- Definition Classes
- NamedCometActorTrait → BaseCometActor
- val logger: Logger
- Attributes
- protected
- Definition Classes
- Loggable
- Annotations
- @transient()
- def lowPriority: PartialFunction[Any, Unit]
- Definition Classes
- BaseCometActor
- def manualWiringDependencyManagement: Boolean
By default, Lift deals with managing wiring dependencies.
By default, Lift deals with managing wiring dependencies. This means on each full render (a full render will happen on reRender() or on a page load if there have been partial updates.) You may want to manually deal with wiring dependencies. If you do, override this method and return true
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def mediumPriority: PartialFunction[Any, Unit]
- Definition Classes
- BaseCometActor
- def messageHandler: PartialFunction[Any, Unit]
- Attributes
- protected
- Definition Classes
- BaseCometActor → SpecializedLiftActor
- def name: Box[String]
The optional name of this CometActors
The optional name of this CometActors
- Definition Classes
- BaseCometActor → LiftCometActor
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- implicit def nodeSeqFuncToBoxNodeSeq(f: (NodeSeq) => NodeSeq): Box[NodeSeq]
A helpful implicit conversion that takes a NodeSeq => NodeSeq (for example a CssSel) and converts it to a Box[NodeSeq] by applying the function to defaultHtml
A helpful implicit conversion that takes a NodeSeq => NodeSeq (for example a CssSel) and converts it to a Box[NodeSeq] by applying the function to defaultHtml
- Attributes
- protected
- Definition Classes
- BaseCometActor
- implicit def nodeSeqToFull(in: NodeSeq): Box[NodeSeq]
- Definition Classes
- BaseCometActor
- def notice(id: String, n: String): Unit
Similar with S.notice
Similar with S.notice
- Definition Classes
- BaseCometActor
- def notice(id: String, n: NodeSeq): Unit
Similar with S.notice
Similar with S.notice
- Definition Classes
- BaseCometActor
- def notice(n: NodeSeq): Unit
Similar with S.notice
Similar with S.notice
- Definition Classes
- BaseCometActor
- def notice(n: String): Unit
Similar with S.notice
Similar with S.notice
- Definition Classes
- BaseCometActor
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit def nsToNsFuncToRenderOut(f: (NodeSeq) => NodeSeq): RenderOut
Convert a NodeSeq => NodeSeq to a RenderOut.
Convert a NodeSeq => NodeSeq to a RenderOut. The render method returns a RenderOut. This method implicitly (in Scala) or explicitly (in Java) will convert a NodeSeq => NodeSeq to a RenderOut. This is helpful if you use Lift's CSS Selector Transforms to define rendering.
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def onJsonError: Box[JsCmd]
If there's actor-specific JSON behavior on failure to make the JSON call, include the JavaScript here.
If there's actor-specific JSON behavior on failure to make the JSON call, include the JavaScript here.
- Definition Classes
- BaseCometActor
- implicit def pairToPair(in: (String, Any)): (String, NodeSeq)
- Definition Classes
- BaseCometActor
- def parentTag: Elem
- Definition Classes
- BaseCometActor → LiftCometActor
- def partialUpdate(cmd: => JsCmd): Unit
Perform a partial update of the comet component based on the JsCmd.
Perform a partial update of the comet component based on the JsCmd. This means that the JsCmd will be sent to all of the currently listening browser tabs. This is the preferred method over reRender to update the component
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def poke(): Unit
Poke the CometActor and cause it to do a partial update Noop which will have the effect of causing the component to redisplay any Wiring elements on the component.
Poke the CometActor and cause it to do a partial update Noop which will have the effect of causing the component to redisplay any Wiring elements on the component. This method is Actor-safe and may be called from any thread, not just the Actor's message handler thread.
- Definition Classes
- BaseCometActor → LiftCometActor
- def predicateChanged(which: Cell[_]): Unit
If the predicate cell changes, the Dependent will be notified
If the predicate cell changes, the Dependent will be notified
- Definition Classes
- LiftCometActor → Dependent
- def reRender(): Unit
Cause the entire component to be reRendered and pushed out to any listeners.
Cause the entire component to be reRendered and pushed out to any listeners. This method will cause the entire component to be rendered which can result in a huge blob of JavaScript to be sent to the client. It's a much better practice to use partialUpdate for non-trivial CometActor components.
- Definition Classes
- BaseCometActor
- def reRender(sendAll: Boolean): Unit
Cause the entire component to be reRendered and pushed out to any listeners.
Cause the entire component to be reRendered and pushed out to any listeners. This method will cause the entire component to be rendered which can result in a huge blob of JavaScript to be sent to the client. It's a much better practice to use partialUpdate for non-trivial CometActor components.
- sendAll
-- Should the fixed part of the CometActor be rendered.
- Definition Classes
- BaseCometActor
- def receiveJson: PartialFunction[JValue, JsCmd]
Override this method to deal with JSON sent from the browser via the sendJson function.
Override this method to deal with JSON sent from the browser via the sendJson function. This is based on the Lift JSON package rather than the handleJson stuff based on the older util.JsonParser. This is the preferred mechanism. If you use the jsonSend call, you will get a JObject(JField("command", cmd), JField("param", params))
- Definition Classes
- BaseCometActor
- def renderClock: Long
Get the current render clock for the CometActor
Get the current render clock for the CometActor
- Definition Classes
- BaseCometActor
- def reply(v: Any): Unit
- Attributes
- protected
- Definition Classes
- LiftActor → ForwardableActor
- def reportError(msg: String, exception: Exception): Unit
How to report an error that occurs during message dispatch
How to report an error that occurs during message dispatch
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def running: Boolean
Is the CometActor running?
Is the CometActor running?
- Attributes
- protected
- Definition Classes
- BaseCometActor
- def send(msg: Any): Unit
- Definition Classes
- SpecializedLiftActor
- def sendAndGetFuture(msg: Any): LAFuture[Any]
- Definition Classes
- LiftActor
- def sendAndGetReply(timeout: Long, msg: Any): Any
- Definition Classes
- LiftActor
- def sendAndGetReply(msg: Any): Any
- Definition Classes
- LiftActor
- def sendInitialReq_?: Boolean
Is this CometActor going to capture the initial Req object? If yes, override this method and return true and override captureInitialReq to capture the Req.
Is this CometActor going to capture the initial Req object? If yes, override this method and return true and override captureInitialReq to capture the Req. Why have to explicitly ask for the Req? In order to send Req instances across threads, the Req objects must be snapshotted which is the process of reading the POST or PUT body from the HTTP request stream. We don't want to do this unless we have to, so by default the Req is not snapshotted/sent. But if you want it, you can have it.
- Definition Classes
- LiftCometActor
- def startQuestion(what: Any): Unit
- Attributes
- protected
- Definition Classes
- BaseCometActor
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def testTranslate(f: (Any) => Boolean)(v: Any): Boolean
- Attributes
- protected
- Definition Classes
- LiftActor → SpecializedLiftActor
- def theSession: LiftSession
- Definition Classes
- BaseCometActor
- def theType: Box[String]
The optional type of this CometActor
The optional type of this CometActor
- Definition Classes
- BaseCometActor → LiftCometActor
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unWatch: Unit
- Definition Classes
- BaseCometActor
- val uniqueId: String
- Definition Classes
- BaseCometActor → LiftCometActor
- def unregisterFromAllDependencies(): Unit
- Attributes
- protected
- Definition Classes
- Dependent
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warning(id: String, n: String): Unit
Similar with S.warning
Similar with S.warning
- Definition Classes
- BaseCometActor
- def warning(id: String, n: NodeSeq): Unit
Similar with S.warning
Similar with S.warning
- Definition Classes
- BaseCometActor
- def warning(n: NodeSeq): Unit
Similar with S.warning
Similar with S.warning
- Definition Classes
- BaseCometActor
- def warning(n: String): Unit
Similar with S.warning
Similar with S.warning
- Definition Classes
- BaseCometActor
- def whoDoIDependOn: Seq[Cell[_]]
- Attributes
- protected
- Definition Classes
- Dependent
- def youDependOnMe(who: Cell[_]): Unit
- Definition Classes
- Dependent
- def youDontDependOnMe(who: Cell[_]): Unit
- Definition Classes
- Dependent