com.hazelcast.core

## Class Message<E>

- java.lang.Object
- - java.util.EventObject
  - - com.hazelcast.core.Message<E>

- Type Parameters:
    `E` - message type
  All Implemented Interfaces:
    Serializable

      public class Message<E>
      extends EventObject

  Message for `ITopic`.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected E` | `messageObject`

    - ### Fields inherited from class java.util.EventObject

      `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Message(String topicName, E messageObject, long publishTime, Member publishingMember)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `E` | `getMessageObject()` Returns the published message
    `Member` | `getPublishingMember()` Returns the member that published the message.
    `long` | `getPublishTime()` Return the time when the message is published

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

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

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

- - ### Field Detail

    - #### messageObject

          protected E messageObject

  - ### Constructor Detail

    - #### Message

          public Message(String topicName,
                         E messageObject,
                         long publishTime,
                         Member publishingMember)

  - ### Method Detail

    - #### getMessageObject

          public E getMessageObject()

      Returns the published message
      Returns:
        the published message object

    - #### getPublishTime

          public long getPublishTime()

      Return the time when the message is published
      Returns:
        the time when the message is published in milliseconds since 1970.01.01.

    - #### getPublishingMember

          public Member getPublishingMember()

      Returns the member that published the message. It can be that the member is null if:
      1. the message was send by a client and not a member
      2. the member that send the message, left the cluster before the message was processed.
      Returns:
        the member that published the message

Copyright © 2019. All rights reserved.