Package org.onosproject.ui
Interface UiConnection
- 
 public interface UiConnectionAbstraction of a user interface session connection.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description UiTopoLayoutcurrentLayout()Returns the current layout context.java.lang.StringcurrentView()Returns the current view identifier.voidsendMessage(com.fasterxml.jackson.databind.node.ObjectNode message)Sends the specified JSON message to the user interface client.voidsendMessage(java.lang.String type, com.fasterxml.jackson.databind.node.ObjectNode payload)Composes a message into JSON and sends it to the user interface client.voidsetCurrentLayout(UiTopoLayout topoLayout)Changes the current layout context to the specified layout.voidsetCurrentView(java.lang.String viewId)Sets the currently selected view.java.lang.StringuserName()Returns the name of the logged-in user for which this connection exists.
 
- 
- 
- 
Method Detail- 
userNamejava.lang.String userName() Returns the name of the logged-in user for which this connection exists.- Returns:
- logged in user name
 
 - 
currentLayoutUiTopoLayout currentLayout() Returns the current layout context.- Returns:
- current topology layout
 
 - 
setCurrentLayoutvoid setCurrentLayout(UiTopoLayout topoLayout) Changes the current layout context to the specified layout.- Parameters:
- topoLayout- new topology layout context
 
 - 
currentViewjava.lang.String currentView() Returns the current view identifier.- Returns:
- current view
 
 - 
setCurrentViewvoid setCurrentView(java.lang.String viewId) Sets the currently selected view.- Parameters:
- viewId- view identifier
 
 - 
sendMessagevoid sendMessage(com.fasterxml.jackson.databind.node.ObjectNode message) Sends the specified JSON message to the user interface client. It is assumed that the message is already correctly formatted and ready to send.- Parameters:
- message- message to send
 
 - 
sendMessagevoid 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.- Parameters:
- type- message (event) type
- payload- message payload
 
 
- 
 
-