org.apache.activemq.artemis.api.core

## Interface ICoreMessage

- All Superinterfaces:
    Message
  All Known Subinterfaces:
    ClientMessage

      public interface ICoreMessage
      extends Message

  This interface is only to determine the API of methods required for Core Messages

- - ### Field Summary

    - ### Fields inherited from interface org.apache.activemq.artemis.api.core.Message

      `BYTES_TYPE, DEFAULT_TYPE, EMBEDDED_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_BRIDGE_DUPLICATE_ID, HDR_CONTENT_TYPE, HDR_DUPLICATE_DETECTION_ID, HDR_GROUP_ID, HDR_GROUP_SEQUENCE, HDR_LARGE_BODY_SIZE, HDR_LARGE_COMPRESSED, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_ADDRESS, HDR_ORIGINAL_QUEUE, HDR_PREFIX, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_ROUTING_TYPE, HDR_SCALEDOWN_TO_IDS, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, MAP_TYPE, memoryOffset, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `copyHeadersAndProperties(Message msg)` Used on large messages treatment
    `ActiveMQBuffer` | `getBodyBuffer()` The body used for this message.
    `int` | `getBodyBufferSize()` Returns the length in bytes of the body buffer.
    `org.apache.activemq.artemis.core.message.LargeBodyEncoder` | `getBodyEncoder()`
    `InputStream` | `getBodyInputStream()`
    `ActiveMQBuffer` | `getDataBuffer()` Returns a readOnlyBodyBuffer or a decompressed one if the message is compressed.
    `int` | `getEndOfBodyPosition()`
    `int` | `getHeadersAndPropertiesEncodeSize()`
    `ActiveMQBuffer` | `getReadOnlyBodyBuffer()` Returns a new Buffer slicing the current Body.
    `byte` | `getType()` Return the type of the message
    `boolean` | `isServerMessage()` We are really interested if this is a LargeServerMessage.
    `void` | `receiveBuffer_1X(io.netty.buffer.ByteBuf buffer)` it will fix the body of incoming messages from 1.x and before versions
    `void` | `sendBuffer_1X(io.netty.buffer.ByteBuf sendBuffer)`
    `org.apache.activemq.artemis.core.message.impl.CoreMessage` | `setType(byte type)` the type of the message
    `default Map<String,Object>` | `toMap()`

    - ### Methods inherited from interface org.apache.activemq.artemis.api.core.Message

      `acceptsConsumer, clearInternalProperties, containsProperty, containsProperty, copy, copy, decrementDurableRefCount, decrementRefCount, getAddress, getAddressSimpleString, getAnnotation, getAnnotationString, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getConnectionID, getContext, getCorrelationID, getDoubleProperty, getDoubleProperty, getDuplicateIDBytes, getDuplicateProperty, getEncodeSize, getExpiration, getExtraBytesProperty, getFloatProperty, getFloatProperty, getGroupID, getGroupSequence, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMemoryEstimate, getMessageID, getObjectProperty, getObjectProperty, getPersistentSize, getPersister, getPersistSize, getPriority, getPropertyNames, getRefCount, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getUserID, getValidatedUserID, incrementDurableRefCount, incrementRefCount, isDurable, isExpired, isLargeMessage, messageChanged, persist, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putExtraBytesProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putStringProperty, receiveBuffer, reencode, referenceOriginalMessage, rejectConsumer, releaseBuffer, reloadPersistence, removeAnnotation, removeExtraBytesProperty, removeProperty, removeProperty, sendBuffer, setAddress, setAddress, setAnnotation, setBuffer, setConnectionID, setContext, setCorrelationID, setDurable, setExpiration, setGroupID, setGroupID, setGroupSequence, setLastValueProperty, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, setValidatedUserID, toCore, toCore, toPropertyMap`

- - ### Method Detail

    - #### getBodyEncoder

          org.apache.activemq.artemis.core.message.LargeBodyEncoder getBodyEncoder()
                                                                            throws ActiveMQException

      Throws:
        `ActiveMQException`

    - #### getHeadersAndPropertiesEncodeSize

          int getHeadersAndPropertiesEncodeSize()

    - #### getBodyInputStream

          InputStream getBodyInputStream()

      Specified by:
        `getBodyInputStream` in interface `Message`

    - #### getReadOnlyBodyBuffer

          ActiveMQBuffer getReadOnlyBodyBuffer()

      Returns a new Buffer slicing the current Body.

    - #### getBodyBufferSize

          int getBodyBufferSize()

      Returns the length in bytes of the body buffer.

    - #### getDataBuffer

          ActiveMQBuffer getDataBuffer()

      Returns a readOnlyBodyBuffer or a decompressed one if the message is compressed. or the large message buffer.
      Returns:

    - #### getType

          byte getType()

      Return the type of the message
      Specified by:
        `getType` in interface `Message`

    - #### setType

          org.apache.activemq.artemis.core.message.impl.CoreMessage setType(byte type)

      the type of the message
      Specified by:
        `setType` in interface `Message`

    - #### isServerMessage

          boolean isServerMessage()

      We are really interested if this is a LargeServerMessage.
      Returns:

    - #### getBodyBuffer

          ActiveMQBuffer getBodyBuffer()

      The body used for this message.
      Specified by:
        `getBodyBuffer` in interface `Message`
      Returns:

    - #### getEndOfBodyPosition

          int getEndOfBodyPosition()

    - #### copyHeadersAndProperties

          void copyHeadersAndProperties(Message msg)

      Used on large messages treatment

    - #### sendBuffer_1X

          void sendBuffer_1X(io.netty.buffer.ByteBuf sendBuffer)

    - #### receiveBuffer_1X

          void receiveBuffer_1X(io.netty.buffer.ByteBuf buffer)

      it will fix the body of incoming messages from 1.x and before versions

    - #### toMap

          default Map<String,Object> toMap()

      Specified by:
        `toMap` in interface `Message`
      Returns:
        Returns the message in Map form, useful when encoding to JSON

Copyright © 2019 The Apache Software Foundation. All rights reserved.