Package com.yahoo.vespa.config.protocol
Interface JRTConfigRequest
-
- All Known Subinterfaces:
JRTClientConfigRequest
,JRTServerConfigRequest
- All Known Implementing Classes:
JRTClientConfigRequestV3
,JRTServerConfigRequestV3
public interface JRTConfigRequest
Common interface for jrt config requests available both at server and client.- Author:
- Ulf Lilleengen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
errorCode()
Get the error code of this requestjava.lang.String
errorMessage()
Return the error message of this request, mostly corresponding to theErrorCode
.java.lang.String
getClientHostName()
Get the host name of the client that is requesting config.ConfigKey<?>
getConfigKey()
Get the config key of the config request.long
getProtocolVersion()
Get the config protocol versioncom.yahoo.jrt.Request
getRequest()
Get the JRT request object for this config request.java.lang.String
getRequestConfigMd5()
Get the config md5 of the config request.long
getRequestGeneration()
Get the generation of the requested config.java.lang.String
getShortDescription()
Get a short hand description of this request.long
getTimeout()
Get the server timeout of this request.java.util.Optional<VespaVersion>
getVespaVersion()
Get the Vespa version of the client that initiated the requestboolean
validateParameters()
Perform request parameter validation of this config request.
-
-
-
Method Detail
-
getConfigKey
ConfigKey<?> getConfigKey()
Get the config key of the config request.- Returns:
- a
ConfigKey
.
-
validateParameters
boolean validateParameters()
Perform request parameter validation of this config request. This method should be called before fetching any kind of config protocol-specific parameter.- Returns:
- true if valid, false if not.
-
getRequestConfigMd5
java.lang.String getRequestConfigMd5()
Get the config md5 of the config request. Return an empty string if no response has been returned.- Returns:
- a config md5.
-
getRequestGeneration
long getRequestGeneration()
Get the generation of the requested config. If none has been given, 0 should be returned.- Returns:
- the generation in the request.
-
getRequest
com.yahoo.jrt.Request getRequest()
Get the JRT request object for this config request. TODO: This method leaks the internal jrt stuff :(- Returns:
- a
Request
object.
-
getShortDescription
java.lang.String getShortDescription()
Get a short hand description of this request.- Returns:
- a short description
-
errorCode
int errorCode()
Get the error code of this request- Returns:
- the error code as defined in
ErrorCode
.
-
errorMessage
java.lang.String errorMessage()
Return the error message of this request, mostly corresponding to theErrorCode
.- Returns:
- the error message.
-
getTimeout
long getTimeout()
Get the server timeout of this request.- Returns:
- the timeout given to the server
-
getProtocolVersion
long getProtocolVersion()
Get the config protocol version- Returns:
- a protocol version number.
-
getClientHostName
java.lang.String getClientHostName()
Get the host name of the client that is requesting config.- Returns:
- hostname of the client.
-
getVespaVersion
java.util.Optional<VespaVersion> getVespaVersion()
Get the Vespa version of the client that initiated the request- Returns:
- Vespa version of the client
-
-