org.openorb.io
Interface MarshalBuffer.HeaderGenerator
- Enclosing class:
- MarshalBuffer
- public static interface MarshalBuffer.HeaderGenerator
Interface HeaderGenerator.
Method Summary |
void |
beginMessage(MarshalBuffer buffer,
java.lang.Object cookie)
Called to begin a new fragment. |
void |
endMessage(byte[] buf,
int pos,
int len,
boolean fragment,
int length,
java.lang.Object cookie)
Called when message is about to get sent. |
endMessage
public void endMessage(byte[] buf,
int pos,
int len,
boolean fragment,
int length,
java.lang.Object cookie)
- Called when message is about to get sent. Modifications can be made
to the bytes allocated at the addHeader stage.
- Parameters:
buf
- buffer containing the reserved bytes. Not all of the buffer
is considered to be read-write.pos
- offset into buf of first modifiable byte.len
- length of modifiable bytes.fragment
- true if this is called as a response to the fragment
operation.length
- length in bytes between the position that addHeader was
called and the end of the message.cookie
- the cookie passed to the addHeader operation.
beginMessage
public void beginMessage(MarshalBuffer buffer,
java.lang.Object cookie)
- Called to begin a new fragment. Writes may be made to the marshal buffer,
including adding a new header.
- Parameters:
buffer
- the buffer getting marshaled to.cookie
- the cookie passed to the addHeader operation.