com.h3c.util.net.msg

## Class Echo

- java.lang.Object
- - com.h3c.util.net.msg.Conversation
  - - com.h3c.util.net.msg.Echo

-     public class Echo
      extends Conversation

  Echo response conversation that writes back the same messages it receives.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Echo.Provider` Echo conversation provider.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Echo(String topic, int cid, int pid)` Create a new echo conversation.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acceptMessage(byte[] message)` Accept a byte form of a message in the context of a given conversation.
    `int` | `count()` Get the number of echoes provided by this conversation.

    - ### Methods inherited from class com.h3c.util.net.msg.Conversation

      `connection, equals, hashCode, id, isEnded, parentId, setConnection, topic`

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

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

- - ### Constructor Detail

    - #### Echo

          public Echo(String topic,
              int cid,
              int pid)

      Create a new echo conversation.
      Parameters:
        `topic` - conversation topic
        `cid` - conversation id
        `pid` - parent conversation id

  - ### Method Detail

    - #### acceptMessage

          public void acceptMessage(byte[] message)

      Description copied from class: `Conversation`
      Accept a byte form of a message in the context of a given conversation.
      Specified by:
        `acceptMessage` in class `Conversation`
      Parameters:
        `message` - byte buffer containing the raw message

    - #### count

          public int count()

      Get the number of echoes provided by this conversation.
      Returns:
        number of echo responses sent

Copyright © 2014. All Rights Reserved.