Class WebSocketInputSink

java.lang.Object
java.lang.Thread
org.jgrapes.webconsole.base.WebSocketInputSink
All Implemented Interfaces:
Runnable

public class WebSocketInputSink extends Thread
Assembles Input events until a complete JSON message has been collected and then fires the message as JsonInput event.
  • Field Details

    • mapper

      protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
  • Constructor Details

    • WebSocketInputSink

      public WebSocketInputSink(org.jgrapes.core.EventPipeline wsInPipeline, ConsoleConnection consoleChannel)
      Instantiates a new web socket input reader.
      Parameters:
      wsInPipeline - the ws in pipeline
      consoleChannel - the web console channel
  • Method Details

    • feed

      public void feed(org.jgrapes.io.util.ManagedBuffer<CharBuffer> input) throws IOException
      Forward the data to the JSON decoder.
      Parameters:
      input - the data to be converted
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • close

      public void close() throws IOException
      Forward the close to the JSON decoder.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • toString

      public String toString()
      Overrides:
      toString in class Thread