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(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.
|
String |
toString() |
void |
writeTo(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(DataOutputStream outstream) throws IOException
Streamable
IOException
public void readFrom(DataInputStream instream) throws IOException, IllegalAccessException, InstantiationException
Streamable
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.