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.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.
|
public byte getPriority()
public void setPriority(byte priority)
public int size()
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
Copyright © 1998-2020 Red Hat. All Rights Reserved.