Code example for ReentrantReadWriteLock

0
 
    // Debug facility 
    private static final String LOG_TAG = "ViewServer";
 
    private static final String VALUE_PROTOCOL_VERSION = "4";
    private static final String VALUE_SERVER_VERSION = "4";
 
    // Protocol commands 
    // Returns the protocol version 
    private static final String COMMAND_PROTOCOL_VERSION = "PROTOCOL";
    // Returns the server version 
    private static final String COMMAND_SERVER_VERSION = "SERVER";
    // Lists all of the available windows in the system 
    private static final String COMMAND_WINDOW_MANAGER_LIST = "LIST";
    // Keeps a connection open and notifies when the list of windows changes 
    private static final String COMMAND_WINDOW_MANAGER_AUTOLIST = "AUTOLIST";
    // Returns the focused window 
    private static final String COMMAND_WINDOW_MANAGER_GET_FOCUS = "GET_FOCUS";
 
    private ServerSocket mServer;
    private final int mPort;