Class VernacularConfig


  • public class VernacularConfig
    extends Object
    • Constructor Detail

      • VernacularConfig

        public VernacularConfig()
    • Method Detail

      • setPasswordSupplier

        public void setPasswordSupplier​(Supplier<String> passwordSupplier)
        Specifies a Supplier which will be called to find the VNC password if the remote host requires authentication.
        Parameters:
        passwordSupplier - A Supplier which when invoked will return the user's VNC password
      • setErrorListener

        public void setErrorListener​(Consumer<VncException> errorListener)
        Specifies a Consumer which will be passed any Exception which occurs during the VNC session.
        Parameters:
        errorListener - A Consumer which will receive any Exceptions which occur during the VNC session
      • getScreenUpdateListener

        public Consumer<Image> getScreenUpdateListener()
      • setScreenUpdateListener

        public void setScreenUpdateListener​(Consumer<Image> screenUpdateListener)
        Specifies a Consumer which will be passed an Image representing the remote server's desktop every time we receive a screen update.
        Parameters:
        screenUpdateListener - A Consumer which will receive Images representing the updated remote desktop
        See Also:
        Image
      • getRemoteClipboardListener

        public Consumer<String> getRemoteClipboardListener()
      • setRemoteClipboardListener

        public void setRemoteClipboardListener​(Consumer<String> remoteClipboardListener)
        Specifies a Consumer which will be invoked when the sever wants to store text in the clipboard
        Parameters:
        remoteClipboardListener - A Consumer which will be invoked when the sever wants to store text in the clipboard
      • setBellListener

        public void setBellListener​(Consumer<Void> bellListener)
        Specifies a Consumer which will be invoked when the server triggers an alert sound
        Parameters:
        bellListener - A Consumer which will be notified when the server triggers an alert sound
      • isShared

        public boolean isShared()
      • setShared

        public void setShared​(boolean shared)
        Specifies whether we should request 'shared' access to the remote server.

        If this is set to false, most servers will disconnect any other clients as soon as we connect.

        Default: true

        Parameters:
        shared - Should we request shared access to the remote server?
      • getTargetFramesPerSecond

        public int getTargetFramesPerSecond()
      • setTargetFramesPerSecond

        public void setTargetFramesPerSecond​(int targetFramesPerSecond)
        Sets the target number of frames per second we wish to receive from the remote server.

        Note that this is the maximum number of framebuffer updates we will request per second. The server does not have to honour our requests. The higher the number of frames per second, the more bandwidth we will consume.

        Default: 30

        Parameters:
        targetFramesPerSecond - The number of frames per second we want to receive from the remote server
      • getColorDepth

        public ColorDepth getColorDepth()
      • setColorDepth

        public void setColorDepth​(ColorDepth colorDepth)
        Specifies the color depth to request from the remote server. Note that the greater the color depth, the more bandwidth we will consume.

        Default: 8 bits per pixel

        Parameters:
        colorDepth - The color depth for rendering the remote desktop
        See Also:
        ColorDepth