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()voidcreateOrUpdateInitialAdmin(UUID adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword) Create the initial admin, or update the existing one if the admin already exists with the given ID.database()booleanisClosed()voidstart()Start the server instance.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
-
createOrUpdateInitialAdmin
public void createOrUpdateInitialAdmin(UUID adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword) throws IdServerException Description copied from interface:IdServerTypeCreate the initial admin, or update the existing one if the admin already exists with the given ID.- Specified by:
createOrUpdateInitialAdminin interfaceIdServerType- Parameters:
adminId- The admin IDadminName- The initial administrator to createadminEmail- The admin emailadminRealName- The admin's real nameadminPassword- The password for the initial administrator- Throws:
IdServerException- On errors
-
toString
-