com.h3c.util.snmp.command

## Class ReadCommand<I,D,C>

- java.lang.Object
- - com.h3c.util.snmp.command.Command<I>
  - - com.h3c.util.snmp.command.ReadCommand<I,D,C>

- Type Parameters:
    `I` - Type of the command's identity.
    `D` - Type of the command's data.
    `C` - Type of the command's data execution coding format.
  Direct Known Subclasses:
    ReadWriteCommand, SnmpReadCommand, SnmpReadListCommand

      public class ReadCommand<I,D,C>
      extends Command<I>

  Command which only reads data.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadCommand(I identity, Decoder<D,C> decoder)` Creates a new read command.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `D` | `get()` Gets the command execution result.
    `protected Decoder<D,C>` | `getDecoder()` Gets the command decoder.

    - ### Methods inherited from class com.h3c.util.snmp.command.Command

      `equals, getIdentity, hashCode, toString`

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

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

- - ### Constructor Detail

    - #### ReadCommand

          public ReadCommand(I identity,
                     Decoder<D,C> decoder)
                      throws NullPointerException

      Creates a new read command.
      Parameters:
        `identity` - Command's identity.
        `decoder` - Command decoder used to map from modeled data to command execution format.
      Throws:
        `NullPointerException` - If either identity or decoder is null.

  - ### Method Detail

    - #### get

          public D get()

      Gets the command execution result.
      Returns:
        The command execution result.

    - #### getDecoder

          protected Decoder<D,C> getDecoder()

      Gets the command decoder.
      Returns:
        The command decoder.

Copyright © 2014. All Rights Reserved.