Code example for CopyOnWriteArrayList

	private final int mPort;
	private Thread mThread;
	private ExecutorService mThreadPool;
	private final List<WindowListener> mListeners = new CopyOnWriteArrayList<ViewServer.WindowListener>();
	private final HashMap<View, String> mWindows = new HashMap<View, String>();
	private final ReentrantReadWriteLock mWindowsLock = new ReentrantReadWriteLock();
	private View mFocusedWindow;
	private final ReentrantReadWriteLock mFocusLock = new ReentrantReadWriteLock();
	private static ViewServer sServer;
	 * Returns a unique instance of the ViewServer. This method should only be 
	 * called from the main thread of your application. The server will have the 
	 * same lifetime as your process. 
Stop searching for code, let great code find you!  Add Codota to your java IDE