public class NioWebSocketMessageChannel extends NioTcpMessageChannel
channelMap, lastActivityTimeStamp, socketChannelisCached, isRunning, key, myAddress, myClientInputStream, myParser, myPort, mySock, mythread, peerAddress, peerAddressAdvertisedInHeaders, peerPort, peerPortAdvertisedInHeaders, peerProtocol, sipStackmessageProcessor, useCount| Modifier | Constructor and Description |
|---|---|
|
NioWebSocketMessageChannel(InetAddress inetAddress,
int port,
SIPTransactionStack sipStack,
NioTcpMessageProcessor nioTcpMessageProcessor) |
protected |
NioWebSocketMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor,
SocketChannel socketChannel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBytes(byte[] bytes) |
static NioWebSocketMessageChannel |
create(NioWebSocketMessageProcessor nioTcpMessageProcessor,
SocketChannel socketChannel) |
String |
getTransport()
get the transport string.
|
void |
onNewSocket(byte[] message) |
void |
processMessage(SIPMessage message)
Call back method.
|
void |
rewriteUri(SipURI uri) |
protected void |
sendMessage(byte[] msg,
boolean isClient)
Send message to whoever is connected to us.
|
void |
sendMessage(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry)
Send a message to a specified address.
|
void |
sendMessage(SIPMessage sipMessage,
InetAddress receiverAddress,
int receiverPort)
Send a message given SIP message.
|
protected void |
sendNonWebSocketMessage(byte[] msg,
boolean isClient) |
void |
sendWrapped(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry) |
static byte[] |
wrapBufferIntoWebSocketFrame(byte[] buffer,
boolean client) |
close, create, equals, getLastActivityTimestamp, getMessageChannel, getSocketChannel, handleException, isSecure, putMessageChannel, readChannel, removeMessageChannel, sendTCPMessagecancelPingKeepAliveTimeoutTaskIfStarted, close, getKeepAliveTimeout, getKey, getPeerAddress, getPeerInetAddress, getPeerPacketSourceAddress, getPeerPacketSourcePort, getPeerPort, getPeerProtocol, getSIPStack, getViaHost, getViaPort, isReliable, processMessage, rescheduleKeepAliveTimeout, run, sendMessage, sendSingleCLRF, setKeepAliveTimeout, uncachecreateBadReqRes, getEncapsulatedClientTransaction, getHost, getHostPort, getKey, getKey, getMessageProcessor, getPeerHostPort, getPort, getRawIpSourceAddress, getViaHeader, getViaHostPort, logMessage, logResponse, sendMessage, setEncapsulatedClientTransactionprotected NioWebSocketMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor, SocketChannel socketChannel) throws IOException
IOExceptionpublic NioWebSocketMessageChannel(InetAddress inetAddress, int port, SIPTransactionStack sipStack, NioTcpMessageProcessor nioTcpMessageProcessor) throws IOException
IOExceptionpublic static NioWebSocketMessageChannel create(NioWebSocketMessageProcessor nioTcpMessageProcessor, SocketChannel socketChannel) throws IOException
IOExceptionprotected void sendMessage(byte[] msg,
boolean isClient)
throws IOException
NioTcpMessageChannelsendMessage in class NioTcpMessageChannelmsg - is the message to send.IOExceptionprotected void sendNonWebSocketMessage(byte[] msg,
boolean isClient)
throws IOException
IOExceptionpublic static byte[] wrapBufferIntoWebSocketFrame(byte[] buffer,
boolean client)
public void sendWrapped(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry)
throws IOException
IOExceptionpublic void sendMessage(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry)
throws IOException
NioTcpMessageChannelsendMessage in class NioTcpMessageChannelmessage - Pre-formatted message to send.receiverAddress - Address to send it to.receiverPort - Receiver port.IOException - If there is a problem connecting or sending.public void sendMessage(SIPMessage sipMessage, InetAddress receiverAddress, int receiverPort) throws IOException
MessageChannelsendMessage in class MessageChannelsipMessage - is the messge to send.receiverAddress - is the address to which we want to sendreceiverPort - is the port to which we want to sendIOExceptionprotected void addBytes(byte[] bytes)
throws Exception
addBytes in class NioTcpMessageChannelExceptionpublic String getTransport()
NioTcpMessageChannelgetTransport in class NioTcpMessageChannelpublic void onNewSocket(byte[] message)
onNewSocket in class NioTcpMessageChannelpublic void processMessage(SIPMessage message) throws Exception
processMessage in interface SIPMessageListenerprocessMessage in interface RawMessageChannelprocessMessage in class ConnectionOrientedMessageChannelmessage - Exceptionfor the method that gets called
on parse exception.public void rewriteUri(SipURI uri)
Copyright © 2014. All Rights Reserved.