use of vncclient.vnc.FrameBufferUpdateRequest 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");
}
Aggregations