Class PubsubClient.IncomingMessage

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    PubsubClient

    public abstract static class PubsubClient.IncomingMessage
    extends java.lang.Object
    implements java.io.Serializable
    A message received from Pubsub.

    NOTE: This class is Serializable only to support the PubsubTestClient. Java serialization is never used for non-test clients.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      IncomingMessage()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String ackId()
      Id to pass back to Pubsub to acknowledge receipt of this message.
      abstract com.google.pubsub.v1.PubsubMessage message()
      Underlying Message.
      static PubsubClient.IncomingMessage of​(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, long requestTimeMsSinceEpoch, java.lang.String ackId, java.lang.String recordId)  
      abstract java.lang.String recordId()
      Id to pass to the runner to distinguish this message from all others.
      abstract long requestTimeMsSinceEpoch()
      Timestamp (in system time) at which we requested the message (ms since epoch).
      abstract long timestampMsSinceEpoch()
      Timestamp for element (ms since epoch).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IncomingMessage

        public IncomingMessage()
    • Method Detail

      • message

        public abstract com.google.pubsub.v1.PubsubMessage message()
        Underlying Message.
      • timestampMsSinceEpoch

        public abstract long timestampMsSinceEpoch()
        Timestamp for element (ms since epoch). Either Pubsub's processing time, or the custom timestamp associated with the message.
      • requestTimeMsSinceEpoch

        public abstract long requestTimeMsSinceEpoch()
        Timestamp (in system time) at which we requested the message (ms since epoch).
      • ackId

        public abstract java.lang.String ackId()
        Id to pass back to Pubsub to acknowledge receipt of this message.
      • recordId

        public abstract java.lang.String recordId()
        Id to pass to the runner to distinguish this message from all others.
      • of

        public static PubsubClient.IncomingMessage of​(com.google.pubsub.v1.PubsubMessage message,
                                                      long timestampMsSinceEpoch,
                                                      long requestTimeMsSinceEpoch,
                                                      java.lang.String ackId,
                                                      java.lang.String recordId)