org.jgroups

## Class Header

- java.lang.Object
- - org.jgroups.Header

- All Implemented Interfaces:
    Streamable
  Direct Known Subclasses:
    AuthHeader, COMPRESS.CompressHeader, DAISYCHAIN.DaisyHeader, DISCARD.DiscardHeader, ENCRYPT.EncryptHeader, Executing.ExecutorHeader, FcHeader, FD_ALL.HeartbeatHeader, FD_SIMPLE.FdHeader, FD_SOCK.FdHeader, FD.FdHeader, FLUSH.FlushHeader, FragHeader, GMS.GmsHeader, HTOTAL.HTotalHeader, Locking.LockingHeader, MERGE3.CoordAnnouncement, MERGEFAST.MergefastHeader, MuxHeader, MuxHeader, NakAckHeader, PingHeader, PrioHeader, PullPushAdapter.PullHeader, RELAY.RelayHeader, RequestCorrelator.Header, SCOPE.ScopeHeader, SEQUENCER.SequencerHeader, SFC.Header, SMACK.SmackHeader, STABLE.StableHeader, STATE_TRANSFER.StateHeader, STOMP.StompHeader, STREAMING_STATE_TRANSFER.StateHeader, TpHeader, UNICAST.UnicastHeader, UNICAST2.Unicast2Header, VERIFY_SUSPECT.VerifyHeader, VIEW_SYNC.ViewSyncHeader

      public abstract class Header
      extends java.lang.Object
      implements Streamable

  Abstract base class for all headers to be added to a Message.
  Author:
    Bela Ban

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Header()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int` | `size()` To be implemented by subclasses.
    `java.lang.String` | `toString()`

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

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

    - ### Methods inherited from interface org.jgroups.util.Streamable

      `readFrom, writeTo`

- - ### Constructor Detail

    - #### Header

          public Header()

  - ### Method Detail

    - #### size

          public abstract int size()

      To be implemented by subclasses. Return the size of this object for the serialized version of it. I.e. how many bytes this object takes when flattened into a buffer. This may be different for each instance, or can be the same. This may also just be an estimation. E.g. FRAG uses it on Message to determine whether or not to fragment the message. Fragmentation itself will be accurate, because the entire message will actually be serialized into a byte buffer, so we can determine the exact size.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.