public class NioTcpMessageProcessor extends ConnectionOrientedMessageProcessor
Modifier and Type | Class and Description |
---|---|
static class |
NioTcpMessageProcessor.ChangeRequest |
Modifier and Type | Field and Description |
---|---|
protected ServerSocketChannel |
channel |
protected NIOHandler |
nioHandler |
protected Selector |
selector |
protected Thread |
selectorThread |
incomingMessageChannels, isRunning, messageChannels, nConnections, sock, useCount
IN_ADDR_ANY, IN6_ADDR_ANY, sipStack, transport
Constructor and Description |
---|
NioTcpMessageProcessor(InetAddress ipAddress,
SIPTransactionStack sipStack,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
assignChannelToDestination(HostPort targetHostPort,
NioTcpMessageChannel channel) |
SocketChannel |
blockingConnect(InetSocketAddress address,
int timeout) |
MessageChannel |
createMessageChannel(HostPort targetHostPort)
Create a message channel for the specified host/port.
|
MessageChannel |
createMessageChannel(InetAddress targetHost,
int port)
Create a message channel for the specified host/port.
|
NioTcpMessageChannel |
createMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor,
SocketChannel client) |
protected gov.nist.javax.sip.stack.NioTcpMessageProcessor.ProcessorTask |
createProcessorTask() |
int |
getDefaultTargetPort()
Default target port used by this processor.
|
boolean |
isSecure()
Flags whether this processor is secure or not.
|
protected void |
remove(ConnectionOrientedMessageChannel messageChannel) |
void |
send(SocketChannel socket,
byte[] data) |
void |
start()
Start our thread.
|
void |
stop()
Stop method.
|
cacheMessageChannel, closeReliableConnection, getMaximumMessageSize, getSIPStack, inUse, setKeepAliveTimeout, validatePortInRange
getDefaultPort, getIpAddress, getListeningPoint, getPort, getSavedIpAddress, getSentBy, getTransport, getViaHeader, initialize, isSentBySet, setIpAddress, setListeningPoint, setSentBy
protected Selector selector
protected Thread selectorThread
protected NIOHandler nioHandler
protected ServerSocketChannel channel
public NioTcpMessageProcessor(InetAddress ipAddress, SIPTransactionStack sipStack, int port)
public void assignChannelToDestination(HostPort targetHostPort, NioTcpMessageChannel channel)
public SocketChannel blockingConnect(InetSocketAddress address, int timeout) throws IOException
IOException
public void send(SocketChannel socket, byte[] data)
public NioTcpMessageChannel createMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor, SocketChannel client) throws IOException
IOException
public MessageChannel createMessageChannel(HostPort targetHostPort) throws IOException
MessageProcessor
createMessageChannel
in class MessageProcessor
IOException
public MessageChannel createMessageChannel(InetAddress targetHost, int port) throws IOException
MessageProcessor
createMessageChannel
in class MessageProcessor
IOException
protected void remove(ConnectionOrientedMessageChannel messageChannel)
remove
in class ConnectionOrientedMessageProcessor
public int getDefaultTargetPort()
MessageProcessor
getDefaultTargetPort
in class MessageProcessor
public boolean isSecure()
MessageProcessor
isSecure
in class MessageProcessor
public void start() throws IOException
MessageProcessor
start
in class MessageProcessor
IOException
protected gov.nist.javax.sip.stack.NioTcpMessageProcessor.ProcessorTask createProcessorTask()
public void stop()
MessageProcessor
stop
in class MessageProcessor
Copyright © 2015. All Rights Reserved.