Class CAServer
java.lang.Object
com.io7m.cardant.server.basic.internal.CAServer
- All Implemented Interfaces:
CAServerType,AutoCloseable
The basic server frontend.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()database()booleanisClosed()voidsetUserAsAdmin(CAUserID adminId, com.io7m.idstore.model.IdName adminName) 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.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.cardant.server.api.CAServerType
inventoryAPI
-
Constructor Details
-
CAServer
The basic server frontend.- Parameters:
inConfiguration- The server configuration
-
-
Method Details
-
start
Description copied from interface:CAServerTypeStart the server instance. Can be called multiple times redundantly, and can be called before or after #close() has been called.- Specified by:
startin interfaceCAServerType- Throws:
CAServerException- On errors
-
database
- Specified by:
databasein interfaceCAServerType- Returns:
- The server's database instance
-
configuration
- Specified by:
configurationin interfaceCAServerType- Returns:
- The server's associated configuration
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceCAServerType- Returns:
trueif the server is closed- See Also:
-
setUserAsAdmin
public void setUserAsAdmin(CAUserID adminId, com.io7m.idstore.model.IdName adminName) throws CAServerException Description copied from interface:CAServerTypeDo the work necessary to set up a server instance (such as initializing and/or upgrading the database) but do not actually start the instance. A user with the given ID will be marked as the administrator and assigned all available security roles.
The given name is simply informative; it will be replaced by the name in the identity server the first time the user logs in.
- Specified by:
setUserAsAdminin interfaceCAServerType- Parameters:
adminId- The admin IDadminName- The name- Throws:
CAServerException- On errors
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCAServerType- Throws:
CAServerException
-
toString
-