public class SipMessageStreamBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SipMessageStreamBuilder.Configuration
Configuration interface for controlling aspects of the
SipMessageStreamBuilder . |
static class |
SipMessageStreamBuilder.DefaultConfiguration |
Constructor and Description |
---|
SipMessageStreamBuilder(SipMessageStreamBuilder.Configuration config) |
Modifier and Type | Method and Description |
---|---|
SipMessage |
build() |
byte[] |
getArray()
This is very very super duper ugly but is highly adapted to how netty and its buffers
work and we are trying to avoid copying memory if we don't have to.
|
int |
getWritableBytes() |
int |
getWriterIndex() |
boolean |
hasUnprocessData()
After you have actually constructed a new
SipMessage there may
be other messages behind it in the same stream, or parts of one. |
boolean |
isDone() |
boolean |
process() |
boolean |
process(byte[] newData)
Process more incoming data.
|
public SipMessageStreamBuilder(SipMessageStreamBuilder.Configuration config)
public SipMessage build() throws IllegalStateException
IllegalStateException
public int getWriterIndex()
public int getWritableBytes()
public boolean hasUnprocessData()
SipMessage
there may
be other messages behind it in the same stream, or parts of one. Therefore,
after you have build()
a message you can check if there are still
data available and if so, call process()
to kick off more
processing.public boolean process()
public boolean process(byte[] newData)
newData
- public boolean isDone()
public byte[] getArray()
Copyright © 2019. All Rights Reserved.