org.apache.ignite.internal.processors.odbc.jdbc

## Class JdbcResponse

- java.lang.Object
- - org.apache.ignite.internal.processors.odbc.SqlListenerResponse
  - - org.apache.ignite.internal.processors.odbc.jdbc.JdbcResponse

All Implemented Interfaces:
  JdbcRawBinarylizable

    public class JdbcResponse
    extends SqlListenerResponse
    implements JdbcRawBinarylizable

SQL listener response.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.odbc.SqlListenerResponse

`STATUS_FAILED, STATUS_SUCCESS`

### Constructor Summary

Constructors
Constructor and Description
`JdbcResponse()` Default constructs is used for deserialization
`JdbcResponse(int status, String err)` Constructs failed rest response.
`JdbcResponse(JdbcResult res)` Constructs successful rest response.

### Method Summary

Methods
`void` `readBinary(BinaryReaderExImpl reader)` Reads fields from provided reader.
`JdbcResult` `response()`
`String` `toString()`
`void` `writeBinary(BinaryWriterExImpl writer)` Writes fields to provided writer.

### Methods inherited from class org.apache.ignite.internal.processors.odbc.SqlListenerResponse

`error, error, status, status`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### JdbcResponse

    public JdbcResponse()

Default constructs is used for deserialization

#### JdbcResponse

    public JdbcResponse(JdbcResult res)

Constructs successful rest response.

Parameters:
  `res` - Response result.

#### JdbcResponse

    public JdbcResponse(int status,
                @Nullable
                String err)

Constructs failed rest response.

Parameters:
  `status` - Response status.
  `err` - Error, `null` if success is `true`.

### Method Detail

#### response

    public JdbcResult response()

Returns:
  Response object.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### writeBinary

    public void writeBinary(BinaryWriterExImpl writer)
                     throws BinaryObjectException

Writes fields to provided writer.

Specified by:
  `writeBinary` in interface `JdbcRawBinarylizable`
Parameters:
  `writer` - Binary object writer.
Throws:
  `BinaryObjectException` - In case of error.

#### readBinary

    public void readBinary(BinaryReaderExImpl reader)
                    throws BinaryObjectException

Reads fields from provided reader.

Specified by:
  `readBinary` in interface `JdbcRawBinarylizable`
Parameters:
  `reader` - Binary object reader.
Throws:
  `BinaryObjectException` - In case of error.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017