Skip to content

Instantly share code, notes, and snippets.

@abohomol
Created October 25, 2018 11:19
Show Gist options
  • Save abohomol/d5efcd5a30c4020ce02b4ff14a37ba18 to your computer and use it in GitHub Desktop.
Save abohomol/d5efcd5a30c4020ce02b4ff14a37ba18 to your computer and use it in GitHub Desktop.
public class SecuredCommunicationChannel {
private static volatile SecuredCommunicationChannel instance;
public static SecuredCommunicationChannel getInstance() {
if (instance == null) {
synchronized (SecuredCommunicationChannel.class) {
if (instance == null) {
instance = new SecuredCommunicationChannel();
}
}
}
return instance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment