Created
April 14, 2016 08:52
-
-
Save hahcho/cf900e4f8d7a6a276a539093d0adcc08 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
public class AuthenticationFactory { | |
public static Object result; # Change Object with appropriete type returned from AuthenticationManager | |
public static void init() { | |
# code for authentication and so on | |
self.result = AuthenticationManager.method() | |
} | |
public static Object getResult() { | |
return self.result; | |
} | |
} | |
# Example | |
# App starts -> AuthenticationFactory.init() | |
# Random place in App -> AuthenticationFactory.getResult().getUserName() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment