public class NioPipelineParser extends Object
SIPMessageListener
Modifier and Type | Class and Description |
---|---|
class |
NioPipelineParser.Dispatch |
static class |
NioPipelineParser.UnparsedMessage |
Modifier and Type | Field and Description |
---|---|
protected SIPMessageListener |
sipMessageListener
The message listener that is registered with this parser.
|
Modifier | Constructor and Description |
---|---|
protected |
NioPipelineParser()
default constructor.
|
|
NioPipelineParser(SIPTransactionStack sipStack,
SIPMessageListener sipMessageListener,
boolean debug,
int maxMessageSize)
Constructor when we are given a message listener and an input stream
(could be a TCP connection or a file)
|
|
NioPipelineParser(SIPTransactionStack sipStack,
SIPMessageListener mhandler,
int maxMsgSize)
This is the constructor for the pipelined parser.
|
Modifier and Type | Method and Description |
---|---|
void |
addBytes(byte[] bytes) |
void |
close() |
void |
processSIPMessage(SIPMessage message) |
void |
readStream(InputStream inputStream) |
void |
setMessageListener(SIPMessageListener mlistener)
Add a class that implements a SIPMessageListener interface whose methods
get called * on successful parse and error conditons.
|
protected SIPMessageListener sipMessageListener
protected NioPipelineParser()
public NioPipelineParser(SIPTransactionStack sipStack, SIPMessageListener sipMessageListener, boolean debug, int maxMessageSize)
sipMessageListener
- Message listener which has methods that get called back from
the parser when a parse is completein
- Input stream from which to read the input.debug
- Enable/disable tracing or lexical analyser switch.public NioPipelineParser(SIPTransactionStack sipStack, SIPMessageListener mhandler, int maxMsgSize)
mhandler
- a SIPMessageListener implementation that provides the message
handlers to handle correctly and incorrectly parsed messages.in
- An input stream to read messages from.public void close()
public void readStream(InputStream inputStream) throws IOException
IOException
public void processSIPMessage(SIPMessage message)
public void setMessageListener(SIPMessageListener mlistener)
mlistener
- a SIPMessageListener implementation that can react to correct
and incorrect pars.Copyright © 2016. All Rights Reserved.