Created
May 27, 2019 05:43
-
-
Save FrannyZhao/6eeec7b88433c554054cf8b6ddd05f8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static volatile TCPMessageHandler instance = null; | |
public static TCPMessageHandler getInstance() { | |
if (instance == null) { | |
synchronized (TCPMessageHandler.class) { | |
if (instance == null) { | |
instance = new TCPMessageHandler(); | |
} | |
} | |
} | |
return instance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment