Interface RestServiceConfig
- All Superinterfaces:
Config
REST service configuration.
This is an optional configuration for a Web Server. If this configuration is configured, corresponding REST APIs will be exposed for users.
No values can be changed after the server has been started.
- Since:
- 6.10
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceREST API specific configuration.static enumSupported REST API types. -
Method Summary
Modifier and TypeMethodDescriptionaddRestApiConfig(RestServiceConfig.RestApiType restApiType) Creates and addsRestServiceConfig.RestApiConfigofRestServiceConfig.RestApiType.getRestApiConfig(RestServiceConfig.RestApiType restApiType) ReturnsRestServiceConfig.RestApiConfigassociated with suppliedRestServiceConfig.RestApiType.longGets the timeout value, in minutes, for the REST session token, after it is last accessed.voidremoveRestApiConfig(RestServiceConfig.RestApiType restApiType) RemovesRestServiceConfig.RestApiConfigof supplied type.voidsetSessionTokenTimeoutInMins(long sessionTokenTimeoutInMins) Sets the session token time out value in minutes.
-
Method Details
-
getSessionTokenTimeoutInMins
long getSessionTokenTimeoutInMins()Gets the timeout value, in minutes, for the REST session token, after it is last accessed.Session token is generated to be used to access REST APIs. If the session token is used after it times out, it will be invalidated and removed from the server.
If this is not specified, a default of 5 minutes is used.
- Returns:
- the timeout value, in minutes, for the session token after it is last accessed
-
setSessionTokenTimeoutInMins
Sets the session token time out value in minutes.- Parameters:
sessionTokenTimeoutInMins- timeout value for session token, in minutes- Throws:
ConfigException- if setting session token time out fails
-
getRestApiConfig
ReturnsRestServiceConfig.RestApiConfigassociated with suppliedRestServiceConfig.RestApiType.- Parameters:
restApiType-RestServiceConfig.RestApiTypeto use to getRestServiceConfig.RestApiConfig- Returns:
- associated
RestServiceConfig.RestApiConfigwith suppliedRestServiceConfig.RestApiType
-
addRestApiConfig
RestServiceConfig.RestApiConfig addRestApiConfig(RestServiceConfig.RestApiType restApiType) throws ConfigException Creates and addsRestServiceConfig.RestApiConfigofRestServiceConfig.RestApiType.- Parameters:
restApiType- type of REST api config to add.- Returns:
- added instance of
RestServiceConfig.RestApiConfig - Throws:
ConfigException- ifRestServiceConfig.RestApiConfigof supplied type already exists or creating the instance fails
-
removeRestApiConfig
RemovesRestServiceConfig.RestApiConfigof supplied type.- Parameters:
restApiType- type of REST API configuration to remove- Throws:
ConfigException- if removal ofRestServiceConfig.RestApiConfigfails
-