Package com.shinyhut.vernacular.client
Class VernacularConfig
java.lang.Object
com.shinyhut.vernacular.client.VernacularConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ColorDepthprivate Consumer<VncException>private booleanprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanisShared()voidsetBellListener(Consumer<Void> bellListener) Specifies a Consumer which will be invoked when the server triggers an alert soundvoidsetColorDepth(ColorDepth colorDepth) Specifies the color depth to request from the remote server.voidsetErrorListener(Consumer<VncException> errorListener) Specifies a Consumer which will be passed any Exception which occurs during the VNC session.voidsetPasswordSupplier(Supplier<String> passwordSupplier) Specifies a Supplier which will be called to find the VNC password if the remote host requires authentication.voidsetRemoteClipboardListener(Consumer<String> remoteClipboardListener) Specifies a Consumer which will be invoked when the sever wants to store text in the clipboardvoidsetScreenUpdateListener(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.voidsetShared(boolean shared) Specifies whether we should request 'shared' access to the remote server.voidsetTargetFramesPerSecond(int targetFramesPerSecond) Sets the target number of frames per second we wish to receive from the remote server.
-
Field Details
-
passwordSupplier
-
errorListener
-
screenUpdateListener
-
bellListener
-
remoteClipboardListener
-
targetFramesPerSecond
private int targetFramesPerSecond -
colorDepth
-
-
Constructor Details
-
VernacularConfig
public VernacularConfig()
-
-
Method Details
-
getPasswordSupplier
-
setPasswordSupplier
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
-
getErrorListener
-
setErrorListener
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
-
setScreenUpdateListener
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:
-
getRemoteClipboardListener
-
setRemoteClipboardListener
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
-
getBellListener
-
setBellListener
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
-
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
-
setColorDepth
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:
-