public abstract class MessageProcessor extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
IN_ADDR_ANY
A string containing the 0.0.0.0 IPv4 ANY address.
|
protected static String |
IN6_ADDR_ANY
A string containing the ::0 IPv6 ANY address.
|
protected SIPTransactionStack |
sipStack
Our stack (that created us).
|
protected String |
transport
The transport where I am listening
|
Modifier | Constructor and Description |
---|---|
protected |
MessageProcessor(InetAddress ipAddress,
int port,
String transport,
SIPTransactionStack transactionStack)
Constructor
|
protected |
MessageProcessor(String transport) |
Modifier and Type | Method and Description |
---|---|
abstract MessageChannel |
createMessageChannel(HostPort targetHostPort)
Create a message channel for the specified host/port.
|
abstract MessageChannel |
createMessageChannel(InetAddress targetHost,
int port)
Create a message channel for the specified host/port.
|
static int |
getDefaultPort(String transport)
Get the defalt port for the message processor.
|
abstract int |
getDefaultTargetPort()
Default target port used by this processor.
|
InetAddress |
getIpAddress() |
ListeningPointImpl |
getListeningPoint() |
abstract int |
getMaximumMessageSize()
Maximum number of bytes that this processor can handle.
|
int |
getPort()
Get the port identifier.
|
String |
getSavedIpAddress()
Get the saved IP Address.
|
String |
getSentBy()
Get the sentby string.
|
abstract SIPTransactionStack |
getSIPStack()
Get the SIP Stack.
|
String |
getTransport()
Get the transport string.
|
Via |
getViaHeader()
Get the Via header to assign for this message processor.
|
void |
initialize(InetAddress ipAddress,
int port,
SIPTransactionStack transactionStack)
Initializes this MessageProcessor.
|
abstract boolean |
inUse()
Return true if there are pending messages to be processed (which prevents
the message channel from being closed).
|
abstract boolean |
isSecure()
Flags whether this processor is secure or not.
|
boolean |
isSentBySet() |
protected void |
setIpAddress(InetAddress ipAddress) |
void |
setListeningPoint(ListeningPointImpl lp) |
void |
setSentBy(String sentBy)
Set the sentby string.
|
abstract void |
start()
Start our thread.
|
abstract void |
stop()
Stop method.
|
protected static final String IN_ADDR_ANY
protected static final String IN6_ADDR_ANY
protected String transport
protected SIPTransactionStack sipStack
protected MessageProcessor(String transport)
protected MessageProcessor(InetAddress ipAddress, int port, String transport, SIPTransactionStack transactionStack)
ipAddress
- -- ip address where I am listening for incoming requests.port
- -- port where i am listening for incoming requests.transport
- -- transport to use for the message processor (UDP/TCP/TLS).public final void initialize(InetAddress ipAddress, int port, SIPTransactionStack transactionStack)
ipAddress2
- transactionStack
- port2
- public String getTransport()
public int getPort()
public Via getViaHeader()
public ListeningPointImpl getListeningPoint()
public void setListeningPoint(ListeningPointImpl lp)
public String getSavedIpAddress()
public InetAddress getIpAddress()
protected void setIpAddress(InetAddress ipAddress)
ipAddress
- the ipAddress to setpublic void setSentBy(String sentBy) throws ParseException
sentBy
- ParseException
public String getSentBy()
public abstract SIPTransactionStack getSIPStack()
public abstract MessageChannel createMessageChannel(HostPort targetHostPort) throws IOException
IOException
public abstract MessageChannel createMessageChannel(InetAddress targetHost, int port) throws IOException
IOException
public abstract void start() throws IOException
IOException
public abstract void stop()
public abstract int getDefaultTargetPort()
public abstract boolean isSecure()
public abstract int getMaximumMessageSize()
public abstract boolean inUse()
public boolean isSentBySet()
public static int getDefaultPort(String transport)
transport
- Copyright © 2018. All Rights Reserved.