public class ErrorCodeLookup extends Object
| Modifier and Type | Method and Description |
|---|---|
static Class<? extends ErrorCode> |
codeClass(ErrorType type)
Returns the class of error code for the given error type.
|
static ErrorCode |
lookup(ErrorType type,
int code,
ProtocolVersion pv)
Looks up the error code constant for the given encoded value, based
on the supplied high-level error type.
|
static void |
validate(ErrorType type,
ErrorCode code,
ProtocolVersion pv)
Validates the error type/code combination for the specified
protocol version, silently returning if all is well, or throwing
an exception if the combination is invalid.
|
public static ErrorCode lookup(ErrorType type, int code, ProtocolVersion pv) throws DecodeException
type - the error typecode - the error code value to look uppv - the protocol versionDecodeException - if the code value cannot be decodedpublic static Class<? extends ErrorCode> codeClass(ErrorType type)
type - the error typepublic static void validate(ErrorType type, ErrorCode code, ProtocolVersion pv)
code - the error codetype - the error typepv - the protocol versionCopyright © 2014. All Rights Reserved.