Package fr.gouv.vitam.common.serverv2
Class VitamStarter
java.lang.Object
fr.gouv.vitam.common.serverv2.VitamStarter
launch vitam server
-
Constructor Summary
ConstructorDescriptionVitamStarter
(Class<? extends VitamApplicationConfiguration> configurationType, String configurationFile, Class<? extends javax.ws.rs.core.Application> businessApplication, Class<? extends javax.ws.rs.core.Application> adminApplication) ConstructorVitamStarter
(Class<? extends VitamApplicationConfiguration> configurationType, String configurationFile, Class<? extends javax.ws.rs.core.Application> businessApplication, Class<? extends javax.ws.rs.core.Application> adminApplication, List<javax.servlet.ServletContextListener> customListeners, boolean deployStaticResources) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.jetty.server.Handler
buildAdminHandler
(String configurationFile) protected org.eclipse.jetty.server.Handler
buildApplicationHandler
(String configurationFile, VitamApplicationConfiguration configuration) protected final void
protected void
Allow override Vitam parametersfinal Class<? extends VitamApplicationConfiguration>
Get configuration TypeGet the vitam serverboolean
Check if server is startedboolean
Check if server is stoppedfinal void
run()
Run method, start and join the servervoid
start()
For Junit tests, starts only, not joinvoid
stop()
For Junit tests, stops the server
-
Constructor Details
-
VitamStarter
public VitamStarter(Class<? extends VitamApplicationConfiguration> configurationType, String configurationFile, Class<? extends javax.ws.rs.core.Application> businessApplication, Class<? extends javax.ws.rs.core.Application> adminApplication) Constructor- Parameters:
configurationType
- configuration typeconfigurationFile
- configuration filebusinessApplication
- business applicationadminApplication
- admin application
-
VitamStarter
public VitamStarter(Class<? extends VitamApplicationConfiguration> configurationType, String configurationFile, Class<? extends javax.ws.rs.core.Application> businessApplication, Class<? extends javax.ws.rs.core.Application> adminApplication, List<javax.servlet.ServletContextListener> customListeners, boolean deployStaticResources) Constructor- Parameters:
configurationType
- configuration typeconfigurationFile
- configuration filebusinessApplication
- business applicationadminApplication
- admin applicationcustomListeners
- list of custom listeners
-
-
Method Details
-
configure
-
configureVitamParameters
protected void configureVitamParameters()Allow override Vitam parameters -
getConfigurationType
Get configuration Type- Returns:
- configuration type
-
buildApplicationHandler
protected org.eclipse.jetty.server.Handler buildApplicationHandler(String configurationFile, VitamApplicationConfiguration configuration) throws VitamApplicationServerException - Throws:
VitamApplicationServerException
-
buildAdminHandler
-
run
Run method, start and join the server- Throws:
VitamApplicationServerException
-
start
For Junit tests, starts only, not join- Throws:
VitamApplicationServerException
- in case the server could not be started
-
stop
For Junit tests, stops the server- Throws:
VitamApplicationServerException
-
isStarted
public boolean isStarted()Check if server is started- Returns:
- true if started
-
getVitamServer
Get the vitam server- Returns:
- the vitam server
-
isStopped
public boolean isStopped()Check if server is stopped- Returns:
- true if stopped
-