Class WebSocketChannel
java.lang.Object
com.inductiveautomation.perspective.gateway.comm.WebSocketChannel
- All Implemented Interfaces:
- MessageChannel
A 
WebSocketChannel connection that is mounted for realtime messaging between a running web-client and the
 Ignition gateway's Perspective module.- Since:
- 8.0.0
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Close the message channelbooleangetCloseEventDefinitions(int code) Returns the view group identifier, which is used to differentiate between different instances of the same project .Returns the name of the project, which is unique.voidinthashCode()booleanisClosed()booleanisOpen()voidvoidonConnect(org.eclipse.jetty.websocket.api.Session socket) voidvoidvoidSends a message to be handled by the appropriate handler (as identified by the protocol)
- 
Method Details- 
getProjectDescription copied from interface:MessageChannelReturns the name of the project, which is unique.- Specified by:
- getProjectin interface- MessageChannel
 
- 
getPageIdDescription copied from interface:MessageChannelReturns the view group identifier, which is used to differentiate between different instances of the same project . For a live project running in a browser, this might be the unique browser tab identifier. For a designer, this may be a specific workspace tab.- Specified by:
- getPageIdin interface- MessageChannel
 
- 
isOpenpublic boolean isOpen()- Specified by:
- isOpenin interface- MessageChannel
- Returns:
- false if the message channel not connected
 
- 
isClosedpublic boolean isClosed()- Specified by:
- isClosedin interface- MessageChannel
- Returns:
- true iff this channel was closed by the local side of this connection (in order words: from a call
 to MessageChannel.close()
 
- 
sendDescription copied from interface:MessageChannelSends a message to be handled by the appropriate handler (as identified by the protocol)- Specified by:
- sendin interface- MessageChannel
- Throws:
- IOException
 
- 
closepublic void close()Description copied from interface:MessageChannelClose the message channel- Specified by:
- closein interface- MessageChannel
 
- 
onConnect@OnWebSocketConnect public void onConnect(org.eclipse.jetty.websocket.api.Session socket) 
- 
onMessage@OnWebSocketMessage public void onMessage(org.eclipse.jetty.websocket.api.Session client, String rawMessage) throws IOException - Throws:
- IOException
 
- 
onClose
- 
onError
- 
equals
- 
hashCodepublic int hashCode()
- 
handleSocketInitpublic void handleSocketInit()
- 
getCloseEventDefinitions
- 
getAllCloseEventDefinitionsAsJson
 
-