VNCj

gnu.vnc.console
Class VNCConsole

java.lang.Object
  |
  +--gnu.vnc.console.VNCConsole
All Implemented Interfaces:
RFBServer, Runnable

public abstract class VNCConsole
extends Object
implements RFBServer, Runnable

Base class for console emulators supporting multiple RFB clients.


Field Summary
private  VNCConsoleBuffer buffer
           
private  Dimension charSize
           
private  RFBClients clients
           
private  int columns
           
private  String displayName
           
protected  InputStream in
           
protected  PrintStream out
           
private  int rows
           
private  boolean shared
           
 
Constructor Summary
VNCConsole(String displayName, int columns, int rows, int charW, int charH)
           
 
Method Summary
 void addClient(RFBClient client)
           
 boolean allowShared()
           
 void clientCutText(RFBClient client, String text)
           
 void dispose()
           
 void fixColourMapEntries(RFBClient client, int firstColour, Colour[] colourMap)
           
 void frameBufferUpdateRequest(RFBClient client, boolean incremental, int x, int y, int w, int h)
           
 String getDesktopName(RFBClient client)
           
 int getFrameBufferHeight(RFBClient client)
           
 int getFrameBufferWidth(RFBClient client)
           
 PixelFormat getPreferredPixelFormat(RFBClient client)
           
 void keyEvent(RFBClient client, boolean down, int key)
           
abstract  void main()
           
 void pointerEvent(RFBClient client, int buttonMask, int x, int y)
           
 void removeClient(RFBClient client)
           
 void run()
           
 void setClientProtocolVersionMsg(RFBClient client, String protocolVersionMsg)
           
 void setEncodings(RFBClient client, int[] encodings)
           
 void setPixelFormat(RFBClient client, PixelFormat pixelFormat)
           
 void setShared(RFBClient client, boolean shared)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displayName

private String displayName

columns

private int columns

rows

private int rows

charSize

private Dimension charSize

buffer

private VNCConsoleBuffer buffer

clients

private RFBClients clients

shared

private boolean shared

in

protected InputStream in

out

protected PrintStream out
Constructor Detail

VNCConsole

public VNCConsole(String displayName,
                  int columns,
                  int rows,
                  int charW,
                  int charH)
Method Detail

main

public abstract void main()

dispose

public void dispose()

addClient

public void addClient(RFBClient client)
Specified by:
addClient in interface RFBServer

removeClient

public void removeClient(RFBClient client)
Specified by:
removeClient in interface RFBServer

getDesktopName

public String getDesktopName(RFBClient client)
Specified by:
getDesktopName in interface RFBServer

getFrameBufferWidth

public int getFrameBufferWidth(RFBClient client)
Specified by:
getFrameBufferWidth in interface RFBServer

getFrameBufferHeight

public int getFrameBufferHeight(RFBClient client)
Specified by:
getFrameBufferHeight in interface RFBServer

getPreferredPixelFormat

public PixelFormat getPreferredPixelFormat(RFBClient client)
Specified by:
getPreferredPixelFormat in interface RFBServer

allowShared

public boolean allowShared()
Specified by:
allowShared in interface RFBServer

setClientProtocolVersionMsg

public void setClientProtocolVersionMsg(RFBClient client,
                                        String protocolVersionMsg)
                                 throws IOException
Specified by:
setClientProtocolVersionMsg in interface RFBServer
IOException

setShared

public void setShared(RFBClient client,
                      boolean shared)
               throws IOException
Specified by:
setShared in interface RFBServer
IOException

setPixelFormat

public void setPixelFormat(RFBClient client,
                           PixelFormat pixelFormat)
                    throws IOException
Specified by:
setPixelFormat in interface RFBServer
IOException

setEncodings

public void setEncodings(RFBClient client,
                         int[] encodings)
                  throws IOException
Specified by:
setEncodings in interface RFBServer
IOException

fixColourMapEntries

public void fixColourMapEntries(RFBClient client,
                                int firstColour,
                                Colour[] colourMap)
                         throws IOException
Specified by:
fixColourMapEntries in interface RFBServer
IOException

frameBufferUpdateRequest

public void frameBufferUpdateRequest(RFBClient client,
                                     boolean incremental,
                                     int x,
                                     int y,
                                     int w,
                                     int h)
                              throws IOException
Specified by:
frameBufferUpdateRequest in interface RFBServer
IOException

keyEvent

public void keyEvent(RFBClient client,
                     boolean down,
                     int key)
              throws IOException
Specified by:
keyEvent in interface RFBServer
IOException

pointerEvent

public void pointerEvent(RFBClient client,
                         int buttonMask,
                         int x,
                         int y)
                  throws IOException
Specified by:
pointerEvent in interface RFBServer
IOException

clientCutText

public void clientCutText(RFBClient client,
                          String text)
                   throws IOException
Specified by:
clientCutText in interface RFBServer
IOException

run

public void run()
Specified by:
run in interface Runnable

VNCj