org.jgroups.Header Maven / Gradle / Ivy
Go to download
This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including
all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and
JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up
with different versions on classes on the class path).
The newest version!
package org.jgroups;
import org.jgroups.util.SizeStreamable;
/**
* Header is a JGroups internal base class for all JGroups headers. Client normally do not need to
* interact with headers unless they are developing their custom protocols.
*
* @author Bela Ban
* @since 2.0
*/
public abstract class Header implements SizeStreamable, Constructable {
/** The ID of the protocol which added a header to a message. Set externally, e.g. by {@link BaseMessage#putHeader(short,Header)} */
protected short prot_id;
public short getProtId() {return prot_id;}
public Header setProtId(short id) {this.prot_id=id; return this;}
/** Returns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same */
public abstract short getMagicId();
public String toString() {
return '[' + getClass().getSimpleName() + "]";
}
}