Class CopilotSession

java.lang.Object
com.vaadin.copilot.CopilotSession

public class CopilotSession extends Object
The main code for Copilot for a given VaadinSession instance.

One instance of this class is created for each VaadinSession which mean it is ok to use and store VaadinSession specific data in this class and command classes it uses, and in project manager etc.

  • Constructor Summary

    Constructors
    Constructor
    Description
    CopilotSession(com.vaadin.flow.server.VaadinSession vaadinSession, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
    Create a new CopilotSession for the given VaadinSession.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleConnect(com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
     
    void
    handleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
    Handle a message from the client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CopilotSession

      public CopilotSession(com.vaadin.flow.server.VaadinSession vaadinSession, com.vaadin.base.devserver.DevToolsInterface devToolsInterface) throws IOException
      Create a new CopilotSession for the given VaadinSession.
      Parameters:
      vaadinSession - the VaadinSession
      devToolsInterface - used to send messages back to the browser
      Throws:
      IOException - if an error occurs
  • Method Details

    • handleConnect

      public void handleConnect(com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
    • handleMessage

      public void handleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
      Handle a message from the client.
      Parameters:
      command - the command
      data - the data, specific to the command
      devToolsInterface - used to send messages back to the browser