Class IdServer
java.lang.Object
com.io7m.idstore.server.vanilla.internal.IdServer
- All Implemented Interfaces:
IdServerType
,AutoCloseable
The internal server frontend.
-
Constructor Summary
ConstructorDescriptionIdServer
(IdServerConfiguration inConfiguration) The internal server frontend. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
createOrUpdateInitialAdmin
(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()
boolean
isClosed()
void
start()
Start the server instance.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:IdServerType
Start the server instance. Can be called multiple times redundantly, and can be called before or after #close() has been called.- Specified by:
start
in interfaceIdServerType
- Throws:
IdServerException
- On errors
-
database
- Specified by:
database
in interfaceIdServerType
- Returns:
- The server's database instance
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceIdServerType
- Returns:
true
if the server is closed- See Also:
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIdServerType
- Throws:
IdServerException
-
configuration
- Specified by:
configuration
in 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:IdServerType
Create the initial admin, or update the existing one if the admin already exists with the given ID.- Specified by:
createOrUpdateInitialAdmin
in 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
-