Class Service.ErrorResponse
- java.lang.Object
-
- org.apache.calcite.avatica.remote.Service.Base
-
- org.apache.calcite.avatica.remote.Service.Response
-
- org.apache.calcite.avatica.remote.Service.ErrorResponse
-
- Enclosing interface:
- Service
public static class Service.ErrorResponse extends Service.Response
Response for any request that the server failed to successfully perform. It is used internally by the transport layers to format errors for transport over the wire. Thus,Service.apply(org.apache.calcite.avatica.remote.Service.CatalogsRequest)will never return an ErrorResponse.
-
-
Field Summary
Fields Modifier and Type Field Description private static com.google.protobuf.Descriptors.FieldDescriptorERROR_MESSAGE_DESCRIPTORinterrorCodejava.lang.StringerrorMessagejava.util.List<java.lang.String>exceptionsprivate static com.google.protobuf.Descriptors.FieldDescriptorMETADATA_DESCRIPTORstatic intMISSING_CONNECTION_ERROR_CODEService.RpcMetadataResponserpcMetadataAvaticaSeverityseverityprivate static com.google.protobuf.Descriptors.FieldDescriptorSEVERITY_DESCRIPTORprivate static com.google.protobuf.Descriptors.FieldDescriptorSQL_DESCRIPTORjava.lang.StringsqlStatestatic intUNAUTHORIZED_ERROR_CODEstatic java.lang.StringUNAUTHORIZED_SQL_STATEstatic intUNKNOWN_ERROR_CODEstatic java.lang.StringUNKNOWN_SQL_STATE-
Fields inherited from class org.apache.calcite.avatica.remote.Service.Base
PRIME
-
-
Constructor Summary
Constructors Modifier Constructor Description (package private)ErrorResponse()protectedErrorResponse(java.lang.Exception e, java.lang.String errorMessage, int code, java.lang.String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)protectedErrorResponse(java.lang.String errorMessage, int code, java.lang.String sqlState, AvaticaSeverity severity, java.util.List<java.lang.String> exceptions, Service.RpcMetadataResponse rpcMetadata)ErrorResponse(java.util.List<java.lang.String> exceptions, java.lang.String errorMessage, int errorCode, java.lang.String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Service.ErrorResponsedeserialize(com.google.protobuf.Message genericMsg)booleanequals(java.lang.Object o)inthashCode()Responses.ErrorResponseserialize()AvaticaClientRuntimeExceptiontoException()(package private) static java.util.List<java.lang.String>toStackTraces(java.lang.Exception e)java.lang.StringtoString()(package private) static java.lang.StringtoString(java.lang.Exception e)-
Methods inherited from class org.apache.calcite.avatica.remote.Service.Base
p, p, p, p
-
-
-
-
Field Detail
-
ERROR_MESSAGE_DESCRIPTOR
private static final com.google.protobuf.Descriptors.FieldDescriptor ERROR_MESSAGE_DESCRIPTOR
-
SQL_DESCRIPTOR
private static final com.google.protobuf.Descriptors.FieldDescriptor SQL_DESCRIPTOR
-
SEVERITY_DESCRIPTOR
private static final com.google.protobuf.Descriptors.FieldDescriptor SEVERITY_DESCRIPTOR
-
METADATA_DESCRIPTOR
private static final com.google.protobuf.Descriptors.FieldDescriptor METADATA_DESCRIPTOR
-
UNKNOWN_ERROR_CODE
public static final int UNKNOWN_ERROR_CODE
- See Also:
- Constant Field Values
-
MISSING_CONNECTION_ERROR_CODE
public static final int MISSING_CONNECTION_ERROR_CODE
- See Also:
- Constant Field Values
-
UNAUTHORIZED_ERROR_CODE
public static final int UNAUTHORIZED_ERROR_CODE
- See Also:
- Constant Field Values
-
UNKNOWN_SQL_STATE
public static final java.lang.String UNKNOWN_SQL_STATE
- See Also:
- Constant Field Values
-
UNAUTHORIZED_SQL_STATE
public static final java.lang.String UNAUTHORIZED_SQL_STATE
- See Also:
- Constant Field Values
-
exceptions
public final java.util.List<java.lang.String> exceptions
-
errorMessage
public final java.lang.String errorMessage
-
errorCode
public final int errorCode
-
sqlState
public final java.lang.String sqlState
-
severity
public final AvaticaSeverity severity
-
rpcMetadata
public final Service.RpcMetadataResponse rpcMetadata
-
-
Constructor Detail
-
ErrorResponse
ErrorResponse()
-
ErrorResponse
public ErrorResponse(java.util.List<java.lang.String> exceptions, java.lang.String errorMessage, int errorCode, java.lang.String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)
-
ErrorResponse
protected ErrorResponse(java.lang.Exception e, java.lang.String errorMessage, int code, java.lang.String sqlState, AvaticaSeverity severity, Service.RpcMetadataResponse rpcMetadata)
-
ErrorResponse
protected ErrorResponse(java.lang.String errorMessage, int code, java.lang.String sqlState, AvaticaSeverity severity, java.util.List<java.lang.String> exceptions, Service.RpcMetadataResponse rpcMetadata)
-
-
Method Detail
-
toStackTraces
static java.util.List<java.lang.String> toStackTraces(java.lang.Exception e)
-
toString
static java.lang.String toString(java.lang.Exception e)
-
deserialize
Service.ErrorResponse deserialize(com.google.protobuf.Message genericMsg)
- Specified by:
deserializein classService.Response
-
serialize
public Responses.ErrorResponse serialize()
- Specified by:
serializein classService.Response
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toException
public AvaticaClientRuntimeException toException()
-
-