Package com.io7m.idstore.server.api
Interface IdServerType
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
IdServer
A server instance.
-
Method Summary
Modifier and TypeMethodDescriptiondefault URIadminAPI()voidclose()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.default URIuserAPI()default URIuserView()
-
Method Details
-
start
Start the server instance. Can be called multiple times redundantly, and can be called before or after #close() has been called.- Throws:
IdServerException- On errors
-
database
IdDatabaseType database()- Returns:
- The server's database instance
-
isClosed
boolean isClosed() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IdServerException
-
configuration
IdServerConfiguration configuration()- Returns:
- The configuration used for the server
-
userAPI
- Returns:
- The address of the user API
-
userView
- Returns:
- The address of the user view
-
adminAPI
- Returns:
- The address of the admin API
-
setup
void setup(Optional<UUID> adminId, IdName adminName, IdEmail adminEmail, IdRealName adminRealName, String adminPassword) throws IdServerException 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.- 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
-