Class IdServer
java.lang.Object
com.io7m.idstore.server.vanilla.internal.IdServer
- All Implemented Interfaces:
IdServerType,AutoCloseable
The internal server frontend.
-
Constructor Summary
ConstructorsConstructorDescriptionIdServer(IdServerConfiguration inConfiguration) The internal server frontend. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()database()booleanisClosed()voidsetup(Optional<UUID> adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword) Do the work necessary to set up a server instance (such as initializing and/or upgrading the database) but do not actually start the instance.voidstart()Start the server instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.io7m.idstore.server.api.IdServerType
adminAPI, userAPI, userView
-
Constructor Details
-
IdServer
The internal server frontend.- Parameters:
inConfiguration- The server configuration
-
-
Method Details
-
start
Description copied from interface:IdServerTypeStart the server instance. Can be called multiple times redundantly, and can be called before or after #close() has been called.- Specified by:
startin interfaceIdServerType- Throws:
IdServerException- On errors
-
database
- Specified by:
databasein interfaceIdServerType- Returns:
- The server's database instance
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceIdServerType- Returns:
trueif the server is closed- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIdServerType- Throws:
IdServerException
-
configuration
- Specified by:
configurationin interfaceIdServerType- Returns:
- The configuration used for the server
-
setup
public void setup(Optional<UUID> adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword) throws IdServerException Description copied from interface:IdServerTypeDo the work necessary to set up a server instance (such as initializing and/or upgrading the database) but do not actually start the instance.- Specified by:
setupin interfaceIdServerType- Parameters:
adminId- The admin ID, if a specific one is requiredadminName- The initial administrator to createadminEmail- The admin emailadminRealName- The admin's real nameadminPassword- The password for the initial administrator- Throws:
IdServerException- On errors
-