Package run.undead.context
Interface Context
- All Known Implementing Classes:
HttpContext,WsContext
public interface Context
-
Method Summary
Modifier and TypeMethodDescriptiondefault Booleanconnected is true if connected to a websocket, false for http requestid()id is the unique id of the UndeadViewinstancedefault voidpageTitle updates the `` tag of theViewpage.default voidpushEvent(UndeadEvent event) pushEvent pushes an event to the client.voiddefault voidsendInfo(UndeadInfo info) sendInfo sends an internal server message to thisViewinstance.url()url is the URL for thisView
-
Method Details
-
id
String id()id is the unique id of the UndeadViewinstance -
connected
connected is true if connected to a websocket, false for http request -
url
String url()url is the URL for thisView -
pageTitle
pageTitle updates the `` tag of the Viewpage. Requires using theMainLayout.liveTitle(run.undead.template.PageTitle)helper in rendering the page. -
pushEvent
pushEvent pushes an event to the client. Requires either the client javascript to have awindow.addEventListenerdefined for that event or a clientHookto be defined and to be listening for the event viathis.handleEventcallback. -
sendInfo
sendInfo sends an internal server message to thisViewinstance. TheViewmust implement theView.handleInfo(Context, UndeadInfo)callback to handle the info message. -
redirect
-