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 interface
REST API specific configuration.static enum
Supported REST API types. -
Method Summary
Modifier and TypeMethodDescriptionaddRestApiConfig
(RestServiceConfig.RestApiType restApiType) Creates and addsRestServiceConfig.RestApiConfig
ofRestServiceConfig.RestApiType
.getRestApiConfig
(RestServiceConfig.RestApiType restApiType) ReturnsRestServiceConfig.RestApiConfig
associated with suppliedRestServiceConfig.RestApiType
.long
Gets the timeout value, in minutes, for the REST session token, after it is last accessed.void
removeRestApiConfig
(RestServiceConfig.RestApiType restApiType) RemovesRestServiceConfig.RestApiConfig
of supplied type.void
setSessionTokenTimeoutInMins
(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.RestApiConfig
associated with suppliedRestServiceConfig.RestApiType
.- Parameters:
restApiType
-RestServiceConfig.RestApiType
to use to getRestServiceConfig.RestApiConfig
- Returns:
- associated
RestServiceConfig.RestApiConfig
with suppliedRestServiceConfig.RestApiType
-
addRestApiConfig
RestServiceConfig.RestApiConfig addRestApiConfig(RestServiceConfig.RestApiType restApiType) throws ConfigException Creates and addsRestServiceConfig.RestApiConfig
ofRestServiceConfig.RestApiType
.- Parameters:
restApiType
- type of REST api config to add.- Returns:
- added instance of
RestServiceConfig.RestApiConfig
- Throws:
ConfigException
- ifRestServiceConfig.RestApiConfig
of supplied type already exists or creating the instance fails
-
removeRestApiConfig
RemovesRestServiceConfig.RestApiConfig
of supplied type.- Parameters:
restApiType
- type of REST API configuration to remove- Throws:
ConfigException
- if removal ofRestServiceConfig.RestApiConfig
fails
-