nxt.messaging

## Class MessageAppendix

- java.lang.Object
- - nxt.blockchain.Appendix.AbstractAppendix
  - - nxt.messaging.MessageAppendix

- All Implemented Interfaces:
    Appendix

      public class MessageAppendix
      extends Appendix.AbstractAppendix

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface nxt.blockchain.Appendix

      `Appendix.AbstractAppendix, Appendix.Encryptable, Appendix.Parser, Appendix.Prunable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `appendixName`
    `static Appendix.Parser` | `appendixParser`
    `static int` | `appendixType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageAppendix(byte[] message)`
    `MessageAppendix(byte[] message, boolean isText)`
    `MessageAppendix(java.lang.String string)`
    `MessageAppendix(java.lang.String string, boolean isText)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Transaction transaction, Account senderAccount, Account recipientAccount)`
    `java.lang.String` | `getAppendixName()`
    `int` | `getAppendixType()`
    `Fee` | `getBaselineFee(Transaction transaction)`
    `byte[]` | `getMessage()`
    `protected int` | `getMySize()`
    `boolean` | `isAllowed(Chain chain)`
    `boolean` | `isPhasable()`
    `boolean` | `isText()`
    `protected void` | `putMyBytes(java.nio.ByteBuffer buffer)`
    `protected void` | `putMyJSON(org.json.simple.JSONObject json)`
    `void` | `validate(Transaction transaction)`

    - ### Methods inherited from class nxt.blockchain.Appendix.AbstractAppendix

      `getBaselineFeeHeight, getFee, getFullSize, getJSONObject, getNextFee, getNextFeeHeight, getSize, getVersion, isPhased, loadPrunable, loadPrunable, putBytes, validateAtFinish, validateId, verifyVersion`

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

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

    - ### Methods inherited from interface nxt.blockchain.Appendix

      `hasAppendix`

- - ### Field Detail

    - #### appendixType

          public static final int appendixType

      See Also:
        Constant Field Values

    - #### appendixName

          public static final java.lang.String appendixName

      See Also:
        Constant Field Values

    - #### appendixParser

          public static final Appendix.Parser appendixParser

  - ### Constructor Detail

    - #### MessageAppendix

          public MessageAppendix(byte[] message)

    - #### MessageAppendix

          public MessageAppendix(java.lang.String string)

    - #### MessageAppendix

          public MessageAppendix(java.lang.String string,
                                 boolean isText)

    - #### MessageAppendix

          public MessageAppendix(byte[] message,
                                 boolean isText)

  - ### Method Detail

    - #### getAppendixType

          public int getAppendixType()

    - #### getAppendixName

          public java.lang.String getAppendixName()

      Specified by:
        `getAppendixName` in class `Appendix.AbstractAppendix`

    - #### getMySize

          protected int getMySize()

      Specified by:
        `getMySize` in class `Appendix.AbstractAppendix`

    - #### putMyBytes

          protected void putMyBytes(java.nio.ByteBuffer buffer)

      Specified by:
        `putMyBytes` in class `Appendix.AbstractAppendix`

    - #### putMyJSON

          protected void putMyJSON(org.json.simple.JSONObject json)

      Specified by:
        `putMyJSON` in class `Appendix.AbstractAppendix`

    - #### getBaselineFee

          public Fee getBaselineFee(Transaction transaction)

      Specified by:
        `getBaselineFee` in interface `Appendix`
      Overrides:
        `getBaselineFee` in class `Appendix.AbstractAppendix`

    - #### validate

          public void validate(Transaction transaction)
                        throws NxtException.ValidationException

      Specified by:
        `validate` in class `Appendix.AbstractAppendix`
      Throws:
        `NxtException.ValidationException`

    - #### apply

          public void apply(Transaction transaction,
                            Account senderAccount,
                            Account recipientAccount)

      Specified by:
        `apply` in class `Appendix.AbstractAppendix`

    - #### getMessage

          public byte[] getMessage()

    - #### isText

          public boolean isText()

    - #### isPhasable

          public boolean isPhasable()

      Specified by:
        `isPhasable` in class `Appendix.AbstractAppendix`

    - #### isAllowed

          public boolean isAllowed(Chain chain)