org.jgroups.protocols
public class PrioHeader extends Header
// 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 and Description |
---|
PrioHeader() |
PrioHeader(byte priority) |
Modifier and Type | Method and Description |
---|---|
byte |
getPriority() |
void |
readFrom(java.io.DataInputStream 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.DataOutputStream outstream)
Write the entire state of the current object (including superclasses) to outstream.
|
public byte getPriority()
public void setPriority(byte priority)
public int size()
Header
public void writeTo(java.io.DataOutputStream outstream) throws java.io.IOException
Streamable
java.io.IOException
public void readFrom(java.io.DataInputStream instream) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException
Streamable
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.