public interface UiConnection
Modifier and Type | Method and Description |
---|---|
UiTopoLayout |
currentLayout()
Returns the current layout context.
|
java.lang.String |
currentView()
Returns the current view identifier.
|
void |
sendMessage(com.fasterxml.jackson.databind.node.ObjectNode message)
Sends the specified JSON message to the user interface client.
|
void |
sendMessage(java.lang.String type,
com.fasterxml.jackson.databind.node.ObjectNode payload)
Composes a message into JSON and sends it to the user interface client.
|
void |
setCurrentLayout(UiTopoLayout topoLayout)
Changes the current layout context to the specified layout.
|
void |
setCurrentView(java.lang.String viewId)
Sets the currently selected view.
|
java.lang.String |
userName()
Returns the name of the logged-in user for which this connection exists.
|
java.lang.String userName()
UiTopoLayout currentLayout()
void setCurrentLayout(UiTopoLayout topoLayout)
topoLayout
- new topology layout contextjava.lang.String currentView()
void setCurrentView(java.lang.String viewId)
viewId
- view identifiervoid sendMessage(com.fasterxml.jackson.databind.node.ObjectNode message)
message
- message to sendvoid sendMessage(java.lang.String type, com.fasterxml.jackson.databind.node.ObjectNode payload)
type
- message (event) typepayload
- message payload