org.apache.ignite.internal.igfs.common

## Class IgfsControlResponse

- java.lang.Object
- - org.apache.ignite.internal.igfs.common.IgfsMessage
  - - org.apache.ignite.internal.igfs.common.IgfsControlResponse

    public class IgfsControlResponse
    extends IgfsMessage

IGFS path command response.

### Field Summary

Fields
`static int` `RES_HEADER_SIZE` Message header size.
`static int` `RES_TYPE_BOOLEAN` Response is boolean.
`static int` `RES_TYPE_BYTE_ARRAY` Response is collection of IgfsBlockLocation.
`static int` `RES_TYPE_COL_IGFS_BLOCK_LOCATION` Response is collection of IgfsBlockLocation.
`static int` `RES_TYPE_COL_IGFS_FILE` Response is collection of IgfsFile.
`static int` `RES_TYPE_COL_IGFS_PATH` Response is collection of IgfsPath.
`static int` `RES_TYPE_ERR_STREAM_ID` Response is an error containing stream ID and error message.
`static int` `RES_TYPE_HANDSHAKE` Response is a handshake
`static int` `RES_TYPE_IGFS_FILE` Response is IgfsFile.
`static int` `RES_TYPE_IGFS_PATH` Response is IgfsPath.
`static int` `RES_TYPE_IGFS_PATH_SUMMARY` Response is a path summary.
`static int` `RES_TYPE_IGFS_STREAM_DESCRIPTOR` Response is IgfsFileInfo.
`static int` `RES_TYPE_LONG` Response is Long.
`static int` `RES_TYPE_STATUS` Response is a handshake

### Constructor Summary

Constructors
Constructor and Description
`IgfsControlResponse()`

### Method Summary

Methods
`void` `error(IgniteCheckedException e)`
`void` `error(long streamId, String err)`
`int` `errorCode()`
`void` `files(Collection<IgfsFile> res)`
`void` `handshake(IgfsHandshakeResponse res)`
`boolean` `hasError()`
`void` `length(int len)`
`void` `locations(Collection<IgfsBlockLocation> res)`
`void` `paths(Collection<IgfsPath> res)`
`void` `readExternal(ObjectInput in)` Reads object from data input.
`Object` `response()`
`void` `response(boolean res)`
`void` `response(byte[][] res)`
`void` `response(IgfsFile res)`
`void` `response(IgfsInputStreamDescriptor res)`
`void` `response(IgfsPath res)`
`void` `response(IgfsPathSummary res)`
`void` `response(long res)`
`void` `status(IgfsStatus res)`
`void` `throwError()`
`static void` `throwError(Integer errCode, String err)`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)` Writes object to data output.

### Methods inherited from class org.apache.ignite.internal.igfs.common.IgfsMessage

`command, command`

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

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

### Field Detail

#### RES_TYPE_BOOLEAN

    public static final int RES_TYPE_BOOLEAN

Response is boolean.

See Also:
  Constant Field Values

#### RES_TYPE_LONG

    public static final int RES_TYPE_LONG

Response is Long.

See Also:
  Constant Field Values

#### RES_TYPE_IGFS_FILE

    public static final int RES_TYPE_IGFS_FILE

Response is IgfsFile.

See Also:
  Constant Field Values

#### RES_TYPE_IGFS_STREAM_DESCRIPTOR

    public static final int RES_TYPE_IGFS_STREAM_DESCRIPTOR

Response is IgfsFileInfo.

See Also:
  Constant Field Values

#### RES_TYPE_IGFS_PATH

    public static final int RES_TYPE_IGFS_PATH

Response is IgfsPath.

See Also:
  Constant Field Values

#### RES_TYPE_COL_IGFS_FILE

    public static final int RES_TYPE_COL_IGFS_FILE

Response is collection of IgfsFile.

See Also:
  Constant Field Values

#### RES_TYPE_COL_IGFS_PATH

    public static final int RES_TYPE_COL_IGFS_PATH

Response is collection of IgfsPath.

See Also:
  Constant Field Values

#### RES_TYPE_COL_IGFS_BLOCK_LOCATION

    public static final int RES_TYPE_COL_IGFS_BLOCK_LOCATION

Response is collection of IgfsBlockLocation.

See Also:
  Constant Field Values

#### RES_TYPE_BYTE_ARRAY

    public static final int RES_TYPE_BYTE_ARRAY

Response is collection of IgfsBlockLocation.

See Also:
  Constant Field Values

#### RES_TYPE_ERR_STREAM_ID

    public static final int RES_TYPE_ERR_STREAM_ID

Response is an error containing stream ID and error message.

See Also:
  Constant Field Values

#### RES_TYPE_HANDSHAKE

    public static final int RES_TYPE_HANDSHAKE

Response is a handshake

See Also:
  Constant Field Values

#### RES_TYPE_STATUS

    public static final int RES_TYPE_STATUS

Response is a handshake

See Also:
  Constant Field Values

#### RES_TYPE_IGFS_PATH_SUMMARY

    public static final int RES_TYPE_IGFS_PATH_SUMMARY

Response is a path summary.

See Also:
  Constant Field Values

#### RES_HEADER_SIZE

    public static final int RES_HEADER_SIZE

Message header size.

See Also:
  Constant Field Values

### Constructor Detail

#### IgfsControlResponse

    public IgfsControlResponse()

### Method Detail

#### response

    public Object response()

Returns:
  Response.

#### response

    public void response(boolean res)

Parameters:
  `res` - Response.

#### response

    public void response(long res)

Parameters:
  `res` - Response.

#### response

    public void response(byte[][] res)

Parameters:
  `res` - Response.

#### response

    public void response(IgfsInputStreamDescriptor res)

Parameters:
  `res` - Response.

#### response

    public void response(IgfsFile res)

Parameters:
  `res` - Response.

#### response

    public void response(IgfsPath res)

Parameters:
  `res` - Response.

#### response

    public void response(IgfsPathSummary res)

Parameters:
  `res` - Path summary response.

#### files

    public void files(Collection<IgfsFile> res)

Parameters:
  `res` - Response.

#### paths

    public void paths(Collection<IgfsPath> res)

Parameters:
  `res` - Response.

#### locations

    public void locations(Collection<IgfsBlockLocation> res)

Parameters:
  `res` - Response.

#### handshake

    public void handshake(IgfsHandshakeResponse res)

Parameters:
  `res` - Handshake message.

#### status

    public void status(IgfsStatus res)

Parameters:
  `res` - Status response.

#### length

    public void length(int len)

Parameters:
  `len` - Response length.

#### hasError

    public boolean hasError()

Returns:
  Error message if occurred.

#### throwError

    public static void throwError(Integer errCode,
                  String err)
                           throws IgniteCheckedException

Parameters:
  `errCode` - Error code.
  `err` - Error.
Throws:
  `IgniteCheckedException` - Based on error code.

#### throwError

    public void throwError()
                    throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - Based on error code.

#### errorCode

    public int errorCode()

Returns:
  Error code.

#### error

    public void error(IgniteCheckedException e)

Parameters:
  `e` - Error if occurred.

#### error

    public void error(long streamId,
             String err)

Parameters:
  `streamId` - Stream ID.
  `err` - Error message if occurred.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Writes object to data output. Do not use externalizable interface to avoid marshaller.

Parameters:
  `out` - Data output.
Throws:
  `IOException` - If error occurred.

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Reads object from data input.

Parameters:
  `in` - Data input.
Throws:
  `IOException` - If read failed.
  `ClassNotFoundException` - If could not find class.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.2.0-incubating
Release Date | : June 16 2015