|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.Header org.jgroups.protocols.PrioHeader
public class PrioHeader
This Header class is used in conjunction with the PRIO protocol to prioritize message sending/receiving
Priority values are from 0 to 255 where 0 is the highest priority
Example of setting a message priority:
// Create a message to send to everyone
Message message = new Message( null, null, messagePayload );
// Add the priority protocol header
PrioHeader header = new PrioHeader( 1 );
short protocolId = ClassConfigurator.getProtocolId(PRIO.class);
message.putHeader( protocolId, header);
Constructor Summary | |
---|---|
PrioHeader()
|
|
PrioHeader(byte priority)
|
Method Summary | |
---|---|
byte |
getPriority()
|
void |
readFrom(java.io.DataInput instream)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed |
void |
setPriority(byte priority)
|
int |
size()
To be implemented by subclasses. |
java.lang.String |
toString()
|
void |
writeTo(java.io.DataOutput outstream)
Write the entire state of the current object (including superclasses) to outstream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PrioHeader()
public PrioHeader(byte priority)
Method Detail |
---|
public byte getPriority()
public void setPriority(byte priority)
public int size()
Header
size
in class Header
public void writeTo(java.io.DataOutput outstream) throws java.lang.Exception
Streamable
java.lang.Exception
public void readFrom(java.io.DataInput instream) throws java.lang.Exception
Streamable
java.lang.Exception
public java.lang.String toString()
toString
in class Header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |