Package fr.gouv.vitam.common.server
Interface VitamServer
-
- All Superinterfaces:
VitamServerInterface
- All Known Implementing Classes:
BasicVitamServer
public interface VitamServer extends VitamServerInterface
Interface for every Vitam REST Server
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCAN_CONFIGURE_SERVERDefault messagestatic java.lang.StringCONFIG_FILE_IS_A_MANDATORY_ARGUMENTDefault messagestatic java.lang.StringCONFIGURATION_IS_A_MANDATORY_ARGUMENTDefault messagestatic java.lang.StringSERVER_CAN_NOT_STARTDefault messagestatic java.lang.StringSERVER_START_WITH_JETTY_CONFIGDefault message-
Fields inherited from interface fr.gouv.vitam.common.server.VitamServerInterface
ADMIN_CONNECTOR_NAME, BUSINESS_CONNECTOR_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigure(org.eclipse.jetty.server.Handler applicationHandler)Configure the server with one handlerorg.eclipse.jetty.server.HandlergetHandler()org.eclipse.jetty.server.ServergetServer()retrieve the jettyServerorg.eclipse.jetty.xml.XmlConfigurationgetServerConfiguration()get the configuration of jettybooleanisConfigured()booleanisStarted()check if vitam server is startedbooleanisStopped()check if vitam server is stoppedvoidsetHandler(org.eclipse.jetty.server.Handler handler)set jetty handlervoidstart()start the jetty server without join (Junit only)voidstartAndJoin()Start the server with implicit Joinvoidstop()stop the jetty server-
Methods inherited from interface fr.gouv.vitam.common.server.VitamServerInterface
getAdminPort, getPort
-
-
-
-
Field Detail
-
SERVER_CAN_NOT_START
static final java.lang.String SERVER_CAN_NOT_START
Default message- See Also:
- Constant Field Values
-
CONFIG_FILE_IS_A_MANDATORY_ARGUMENT
static final java.lang.String CONFIG_FILE_IS_A_MANDATORY_ARGUMENT
Default message- See Also:
- Constant Field Values
-
CONFIGURATION_IS_A_MANDATORY_ARGUMENT
static final java.lang.String CONFIGURATION_IS_A_MANDATORY_ARGUMENT
Default message- See Also:
- Constant Field Values
-
CAN_CONFIGURE_SERVER
static final java.lang.String CAN_CONFIGURE_SERVER
Default message- See Also:
- Constant Field Values
-
SERVER_START_WITH_JETTY_CONFIG
static final java.lang.String SERVER_START_WITH_JETTY_CONFIG
Default message- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
void configure(org.eclipse.jetty.server.Handler applicationHandler) throws VitamApplicationServerExceptionConfigure the server with one handler- Parameters:
applicationHandler-- Throws:
VitamApplicationServerException
-
startAndJoin
void startAndJoin() throws VitamApplicationServerExceptionStart the server with implicit Join- Throws:
VitamApplicationServerException
-
isConfigured
boolean isConfigured()
- Returns:
- true if Server is configured
-
getHandler
org.eclipse.jetty.server.Handler getHandler()
- Returns:
- the associated handler
-
getServer
org.eclipse.jetty.server.Server getServer()
retrieve the jettyServer- Returns:
- the jetty server
-
getServerConfiguration
org.eclipse.jetty.xml.XmlConfiguration getServerConfiguration()
get the configuration of jetty- Returns:
- the config
-
isStarted
boolean isStarted()
check if vitam server is started- Returns:
- true if jetty server is started
-
isStopped
boolean isStopped()
check if vitam server is stopped- Returns:
- true if jetty server is stopped
-
stop
void stop() throws VitamApplicationServerException
stop the jetty server- Throws:
VitamApplicationServerException
-
start
void start() throws VitamApplicationServerExceptionstart the jetty server without join (Junit only)- Throws:
VitamApplicationServerException
-
setHandler
void setHandler(org.eclipse.jetty.server.Handler handler)
set jetty handler- Parameters:
handler- the handler to set
-
-