|
T-Plan Robot Enterprise 3.2 Build No. 3.2-20121217.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RfbClient
This interface defines methods of an RFB client.
RFB communication is described by the RFB protocol. See e.g. The RFB Protocol v. 3.8 at the RealVNC site. A typical session starts with a few initial handshaking messages which negotiate protocol version, authentication, connection parameters, format of the image data and the initial remote desktop image. After the communication is successfully started, the client keeps sending the mouse, keyboard and clipboard events to the server and the server sends back updated parts of the remote desktop image and server clipboard and bell events.
The client interface defines four types of methods:
The client is not expected to expose methods of the initial handshaking
messages. These should be implemented internally in the connect()
method. The client should be typically used as follows:
connect() method. If the connection fails,
the method throws an exception.
T-Plan Robot Enterprise, (C) 2009-2012 T-Plan Limited. All rights reserved.
| Field Summary | |
|---|---|
static String |
LOGIN_PARAM_SHARED_DESKTOP
|
| Fields inherited from interface com.tplan.robot.remoteclient.RemoteDesktopClient |
|---|
LOGIN_PARAM_PASSWORD, LOGIN_PARAM_URI, LOGIN_PARAM_USER |
| Method Summary | |
|---|---|
int[] |
getEncodings()
Get the array of preferred encoding codes. |
Map<Integer,Encoding> |
getSupportedEncodingMap()
Get a map of encodings supported by the client where key is their numeric code as is stated in the SetEncodings message of the RFB protocol and value is an encoding handler (Encoding instance). |
boolean |
isPseudoCursorEnabled()
Find out whether the pseudo cursor is enabled or not. |
boolean |
isSharedMode()
Find out whether the client is set to connect in the shared mode or not. |
void |
resetModifiersIfNeeded()
Reset all modifiers (Shift, Ctrl, Alt, Meta) which has been previously pressed but haven't been released yet. |
void |
sendFramebufferUpdateRequest(Rectangle rect,
boolean incremental)
Implementation of the FramebufferUpdateRequest client-to-server RFB v3.3 message. |
void |
setEncodings(int[] encodings)
Implementation of the SetEncodings client-to-server RFB v3.3 message. |
void |
setPixelFormat(byte bitsPerPixel,
byte colorDepth,
boolean bigEndian,
boolean trueColor,
int redMax,
int greenMax,
int blueMax,
byte redShift,
byte greenShift,
byte blueShift)
Set the pixel format used by this client. |
void |
setPseudoCursorEnabled(boolean enable)
Convenience method allowing to set on/off the cursor pseudo encoding. |
void |
setSharedMode(boolean sharedMode)
Set whether to connect in a shared or exclusive mode. |
| Methods inherited from interface com.tplan.robot.preferences.Configurable |
|---|
getPreferences, setConfiguration |
| Methods inherited from interface com.tplan.robot.remoteclient.RemoteDesktopClient |
|---|
addClientListener, addServerListener, close, connect, destroy, getConnectString, getDefaultPort, getDesktopHeight, getDesktopName, getDesktopWidth, getHost, getImage, getLastMouseEvent, getLoginParamsSpecification, getPassword, getPort, getProtocol, getUser, hasSufficientConnectInfo, isConnected, isConnectedTo, isConnecting, isConsoleMode, isLocalDisplay, removeClientListener, removeServerListener, sendClientCutText, setConsoleMode, setLoginParams |
| Methods inherited from interface com.tplan.robot.plugin.Plugin |
|---|
checkDependencies, getCode, getDate, getDescription, getDisplayName, getImplementedInterface, getLowestSupportedVersion, getMessageAfterInstall, getMessageBeforeInstall, getSupportContact, getUniqueId, getVendorHomePage, getVendorName, getVersion, requiresRestart |
| Methods inherited from interface com.tplan.robot.remoteclient.capabilities.BellTransferCapable |
|---|
isBellTransferSupported, receiveBell |
| Methods inherited from interface com.tplan.robot.remoteclient.capabilities.PointerTransferCapable |
|---|
isPointerTransferSupported, sendPointerEvent |
| Methods inherited from interface com.tplan.robot.remoteclient.capabilities.KeyTransferCapable |
|---|
isKeyTransferSupported, sendKeyEvent |
| Methods inherited from interface com.tplan.robot.remoteclient.capabilities.DesktopUpdateCapable |
|---|
isKeyTransferSupported |
| Field Detail |
|---|
static final String LOGIN_PARAM_SHARED_DESKTOP
| Method Detail |
|---|
Map<Integer,Encoding> getSupportedEncodingMap()
void setEncodings(int[] encodings)
throws IOException
encodings - array of encodings supported by this server in the order
of preference.
IOException - if an I/O error is received when the new list of encodings
is sent to the client.int[] getEncodings()
setEncodings(int[]) method for details.
boolean isSharedMode()
setSharedMode(boolean),
the method will return the flag value rather than the connection property.
void setSharedMode(boolean sharedMode)
sharedMode - true will set the shared mode, false sets the exclusive one.
void setPixelFormat(byte bitsPerPixel,
byte colorDepth,
boolean bigEndian,
boolean trueColor,
int redMax,
int greenMax,
int blueMax,
byte redShift,
byte greenShift,
byte blueShift)
bitsPerPixel - number of bits per pixel. See the RFB 3.3 SetPixelFormat specification for details.colorDepth - color depth in bits. See the RFB 3.3 SetPixelFormat specification for details.bigEndian - true sets the big endian order, false the little endian one. See the RFB 3.3 SetPixelFormat specification for details.trueColor - true means that pixels contain real RGB values while false indicates that the pixel values are pointers to a color map. See the RFB 3.3 SetPixelFormat specification for details.redMax - maximum value of the red color. See the RFB 3.3 SetPixelFormat specification for details.greenMax - maximum value of the green color. See the RFB 3.3 SetPixelFormat specification for details.blueMax - maximum value of the blue color. See the RFB 3.3 SetPixelFormat specification for details.redShift - the position (bit) where the red color starts in the pixel data. See the RFB 3.3 SetPixelFormat specification for details.greenShift - the position (bit) where the green color starts in the pixel data. See the RFB 3.3 SetPixelFormat specification for details.blueShift - the position (bit) where the blue color starts in the pixel data. See the RFB 3.3 SetPixelFormat specification for details.
void sendFramebufferUpdateRequest(Rectangle rect,
boolean incremental)
throws IOException
rect - rectangle of the remote desktop image the client is
interested in. This argument should never be null - use the full remote
desktop rectangle if you are requesting full image.incremental - this flag is defined by the RFB protocol and
enables/disables incremental sending of the updated image.
IOException - if an I/O error is received when the message
is sent to the client.
void setPseudoCursorEnabled(boolean enable)
throws IOException,
IllegalStateException
Convenience method allowing to set on/off the cursor pseudo encoding. This functionality is supported from the Enterprise version 2.3 and it is only applicable when the Pseudo Cursor Plugin is available. When the encoding is on, the mouse pointer is not part of the desktop image and it is rendered locally by the client. This makes image comparison more reliable because there are no image differences caused by conflicting mouse pointer.
When the encoding is off and it is being switched on, the method
adds the cursor pseudo encoding code (-239) to the list of supported encodings,
calls the setEncodings(int[]) method to notify the server of
the change and also calls sendFramebufferUpdateRequest(java.awt.Rectangle, boolean)
to get a new copy of the screen image without the cursor. When the encoding is being
switched off, the steps are the same but the encoding code is removed
from the list.
Unless this method is called, the client follows the list of encodings which is stored in the local configuration. As the client listens to configuration changes, any change to the list is picked up immediately and applied to the existing VNC connection. A call of this method makes the client switch to a "manual encoding mode" which breaks these rules and makes it bypass the configuration. The impact is that any outside change of the configuration file will not be picked up by this client until this method gets called again.
enable - true enables cursor pseudo encoding, false disables.
IOException - the method throws any exceptions produced
by the the client-server method calls (setEncodings(),
sendFramebufferUpdateRequest()).
IllegalStateException - when the required cursor pseudo encoding
plugin is not available.boolean isPseudoCursorEnabled()
true if the pseudo cursor support is on, false otherwise.void resetModifiersIfNeeded()
|
T-Plan Robot Enterprise 3.2 Build No. 3.2-20121217.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||