Search in sources :

Example 1 with EncodingsMessage

use of vncclient.vnc.EncodingsMessage in project cloudstack by apache.

the class VncClient method assembleVNCPipeline.

private void assembleVNCPipeline(String password, ScreenDescription screen, BufferedImageCanvas canvas) {
    AwtMouseEventSource mouseEventSource = new AwtMouseEventSource("mouse");
    AwtKeyEventSource keyEventSource = new AwtKeyEventSource("keyboard");
    // Subscribe packet sender to various events
    canvas.addMouseListener(mouseEventSource);
    canvas.addMouseMotionListener(mouseEventSource);
    canvas.addKeyListener(keyEventSource);
    add(// RFB protocol version exchanger
    new Vnc33Hello("hello"), // Authenticator
    new Vnc33Authentication("auth", password), // Initializer
    new VncInitializer("init", true, screen), new EncodingsMessage("encodings", RfbConstants.SUPPORTED_ENCODINGS_ARRAY), new RGB888LE32PixelFormatRequest("pixel_format", screen), // Packet receiver
    new VncMessageHandler("message_handler", screen), new AwtBellAdapter("bell"), new AwtClipboardAdapter("clipboard"), new AwtCanvasAdapter("pixels", canvas, screen), new Queue("queue"), new FrameBufferUpdateRequest("fbur", screen), new AwtVncKeyboardAdapter("keyboard_adapter"), new AwtVncMouseAdapter("mouse_adapter"), mouseEventSource, keyEventSource);
    // Link handshake elements
    link("IN", "hello", "auth", "init", "message_handler");
    link("hello >otout", "hello< OUT");
    link("auth >otout", "auth< OUT");
    link("init >otout", "init< OUT");
    link("init >encodings", "encodings");
    link("init >pixel_format", "pixel_format");
    link("encodings", "encodings< OUT");
    link("pixel_format", "pixel_format< OUT");
    // Link main elements
    link("message_handler >bell", "bell");
    link("message_handler >clipboard", "clipboard");
    link("message_handler >pixels", "pixels");
    link("message_handler >fbur", "fbur");
    link("fbur", "fbur< queue");
    link("keyboard", "keyboard_adapter", "keyboard< queue");
    link("mouse", "mouse_adapter", "mouse< queue");
    link("queue", "OUT");
}
Also used : AwtCanvasAdapter(common.adapter.AwtCanvasAdapter) EncodingsMessage(vncclient.vnc.EncodingsMessage) AwtBellAdapter(common.adapter.AwtBellAdapter) AwtMouseEventSource(common.AwtMouseEventSource) AwtVncKeyboardAdapter(vncclient.adapter.AwtVncKeyboardAdapter) VncInitializer(vncclient.vnc.VncInitializer) RGB888LE32PixelFormatRequest(vncclient.vnc.RGB888LE32PixelFormatRequest) VncMessageHandler(vncclient.vnc.VncMessageHandler) AwtClipboardAdapter(common.adapter.AwtClipboardAdapter) AwtKeyEventSource(common.AwtKeyEventSource) Vnc33Authentication(vncclient.vnc.Vnc33Authentication) Vnc33Hello(vncclient.vnc.Vnc33Hello) Queue(streamer.Queue) FrameBufferUpdateRequest(vncclient.vnc.FrameBufferUpdateRequest) AwtVncMouseAdapter(vncclient.adapter.AwtVncMouseAdapter)

Aggregations

AwtKeyEventSource (common.AwtKeyEventSource)1 AwtMouseEventSource (common.AwtMouseEventSource)1 AwtBellAdapter (common.adapter.AwtBellAdapter)1 AwtCanvasAdapter (common.adapter.AwtCanvasAdapter)1 AwtClipboardAdapter (common.adapter.AwtClipboardAdapter)1 Queue (streamer.Queue)1 AwtVncKeyboardAdapter (vncclient.adapter.AwtVncKeyboardAdapter)1 AwtVncMouseAdapter (vncclient.adapter.AwtVncMouseAdapter)1 EncodingsMessage (vncclient.vnc.EncodingsMessage)1 FrameBufferUpdateRequest (vncclient.vnc.FrameBufferUpdateRequest)1 RGB888LE32PixelFormatRequest (vncclient.vnc.RGB888LE32PixelFormatRequest)1 Vnc33Authentication (vncclient.vnc.Vnc33Authentication)1 Vnc33Hello (vncclient.vnc.Vnc33Hello)1 VncInitializer (vncclient.vnc.VncInitializer)1 VncMessageHandler (vncclient.vnc.VncMessageHandler)1