public class NioTlsWebSocketMessageChannel extends NioWebSocketMessageChannel implements NioTlsChannelInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
NioTlsWebSocketMessageChannel.SSLReconnectedException |
channelMap, lastActivityTimeStamp, socketChannelisCached, isRunning, key, myAddress, myClientInputStream, myParser, myPort, mySock, mythread, peerAddress, peerAddressAdvertisedInHeaders, peerPort, peerPortAdvertisedInHeaders, peerProtocol, sipStackmessageProcessor, useCount| Modifier | Constructor and Description |
|---|---|
|
NioTlsWebSocketMessageChannel(InetAddress inetAddress,
int port,
SIPTransactionStack sipStack,
NioTcpMessageProcessor nioTcpMessageProcessor) |
protected |
NioTlsWebSocketMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor,
SocketChannel socketChannel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBytes(byte[] bytes) |
void |
addPlaintextBytes(byte[] bytes)
Add plain text data in the queue.
|
static NioTlsWebSocketMessageChannel |
create(NioTlsWebSocketMessageProcessor nioTcpMessageProcessor,
SocketChannel socketChannel) |
String |
getTransport()
get the transport string.
|
void |
init(boolean clientMode) |
boolean |
isSecure()
TCP Is not a secure protocol.
|
void |
onNewSocket(byte[] message) |
ByteBuffer |
prepareAppDataBuffer()
Initialize the buffer again.
|
ByteBuffer |
prepareEncryptedDataBuffer()
Initialize the buffer again.
|
void |
sendEncryptedData(byte[] msg)
Be able to send already encrypted data or metadata or some SSL frame padding to comply with some extension
|
void |
sendHttpMessage(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry) |
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.
|
protected void |
sendNonWebSocketMessage(byte[] msg,
boolean isClient) |
create, processMessage, rewriteUri, sendWrappedclose, create, equals, getLastActivityTimestamp, getMessageChannel, getSocketChannel, handleException, 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, sendMessage, setEncapsulatedClientTransactionprotected NioTlsWebSocketMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor, SocketChannel socketChannel) throws IOException
IOExceptionpublic NioTlsWebSocketMessageChannel(InetAddress inetAddress, int port, SIPTransactionStack sipStack, NioTcpMessageProcessor nioTcpMessageProcessor) throws IOException
IOExceptionpublic static NioTlsWebSocketMessageChannel create(NioTlsWebSocketMessageProcessor nioTcpMessageProcessor, SocketChannel socketChannel) throws IOException
IOExceptionpublic void init(boolean clientMode)
throws Exception,
CertificateException,
FileNotFoundException,
IOException
public ByteBuffer prepareEncryptedDataBuffer()
NioTlsChannelInterfaceprepareEncryptedDataBuffer in interface NioTlsChannelInterfacepublic ByteBuffer prepareAppDataBuffer()
NioTlsChannelInterfaceprepareAppDataBuffer in interface NioTlsChannelInterfaceprotected void sendMessage(byte[] msg,
boolean isClient)
throws IOException
NioTcpMessageChannelsendMessage in class NioWebSocketMessageChannelmsg - is the message to send.IOExceptionpublic void sendEncryptedData(byte[] msg)
throws IOException
NioTlsChannelInterfacesendEncryptedData in interface NioTlsChannelInterfaceIOExceptionpublic void sendMessage(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry)
throws IOException
NioTcpMessageChannelsendMessage in class NioWebSocketMessageChannelmessage - 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 sendHttpMessage(byte[] message,
InetAddress receiverAddress,
int receiverPort,
boolean retry)
throws IOException
IOExceptionprotected void addBytes(byte[] bytes)
throws Exception
addBytes in class NioWebSocketMessageChannelExceptionprotected void sendNonWebSocketMessage(byte[] msg,
boolean isClient)
throws IOException
sendNonWebSocketMessage in class NioWebSocketMessageChannelIOExceptionpublic String getTransport()
NioTcpMessageChannelgetTransport in class NioWebSocketMessageChannelpublic void onNewSocket(byte[] message)
onNewSocket in class NioWebSocketMessageChannelpublic boolean isSecure()
NioTcpMessageChannelisSecure in class NioTcpMessageChannelpublic void addPlaintextBytes(byte[] bytes)
throws Exception
NioTlsChannelInterfaceaddPlaintextBytes in interface NioTlsChannelInterfaceExceptionCopyright © 2014. All Rights Reserved.