Adding isReady()
This commit is contained in:
@@ -42,18 +42,26 @@ public final class NoCore {
|
||||
public static NoConfigInterface config;
|
||||
public static NoHashSphereInterface hashSphere;
|
||||
|
||||
public static boolean isReady() {
|
||||
return (config != null && config.isReady()) &&
|
||||
(hashSphere != null && hashSphere.isReady());
|
||||
}
|
||||
|
||||
public static void setup(NoConfigInterface config, NoHashSphereInterface hashSphere) {
|
||||
NoCore.setup(config);
|
||||
NoCore.setup(hashSphere);
|
||||
com.sun.org.apache.xml.internal.security.Init.init();
|
||||
}
|
||||
|
||||
public static void setup(NoConfigInterface config) {
|
||||
NoCore.config = config;
|
||||
com.sun.org.apache.xml.internal.security.Init.init();
|
||||
}
|
||||
|
||||
public static void setup(NoHashSphereInterface hashSphere) {
|
||||
NoCore.hashSphere = hashSphere;
|
||||
hashSphere.setup();
|
||||
com.sun.org.apache.xml.internal.security.Init.init();
|
||||
}
|
||||
|
||||
public static void setup() {
|
||||
@@ -65,6 +73,7 @@ public final class NoCore {
|
||||
}
|
||||
NoCore.setup(newConfig);
|
||||
NoCore.setup(new NoHashSphereDefault());
|
||||
com.sun.org.apache.xml.internal.security.Init.init();
|
||||
}
|
||||
|
||||
public static byte[] login(byte[] data, char[] password) throws NoUserNotValidException, NoUserAlreadyOnlineException, NoSessionExpiredException {
|
||||
|
||||
Reference in New Issue
Block a user