public class NioTlsMessageChannel extends NioTcpMessageChannel implements NioTlsChannelInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
NioTlsMessageChannel.SSLReconnectedException |
lastActivityTimeStamp, socketChannelisCached, isRunning, key, myAddress, myClientInputStream, myParser, myPort, mySock, mythread, peerAddress, peerAddressAdvertisedInHeaders, peerPort, peerPortAdvertisedInHeaders, peerProtocol, sipStackmessageProcessor, useCount| Modifier | Constructor and Description |
|---|---|
|
NioTlsMessageChannel(InetAddress inetAddress,
int port,
SIPTransactionStack sipStack,
NioTcpMessageProcessor nioTcpMessageProcessor) |
protected |
NioTlsMessageChannel(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.
|
protected void |
createBuffers() |
HandshakeCompletedListenerImpl |
getHandshakeCompletedListener() |
SipStackImpl |
getSIPStack()
Get my SIP Stack.
|
String |
getTransport()
get the transport string.
|
void |
init(boolean clientMode) |
boolean |
isHandshakeCompleted() |
boolean |
isSecure()
TCP Is not a secure protocol.
|
void |
onNewSocket(byte[] message) |
ByteBuffer |
prepareAppDataBuffer()
Initialize the buffer again.
|
ByteBuffer |
prepareAppDataBuffer(int capacity)
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
|
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 |
setHandshakeCompleted(boolean handshakeCompleted) |
void |
setHandshakeCompletedListener(HandshakeCompletedListener handshakeCompletedListenerImpl) |
close, equals, getLastActivityTimestamp, getSocketChannel, handleException, readChannel, sendTCPMessage, triggerConnectFailure, triggerConnectSuccesscancelPingKeepAliveTimeoutTaskIfStarted, close, getKeepAliveTimeout, getKey, getPeerAddress, getPeerInetAddress, getPeerPacketSourceAddress, getPeerPacketSourcePort, getPeerPort, getPeerProtocol, getViaHost, getViaPort, isReliable, processMessage, processMessage, rescheduleKeepAliveTimeout, run, sendMessage, sendSingleCLRF, setKeepAliveTimeout, uncachecreateBadReqRes, getEncapsulatedClientTransaction, getHost, getHostPort, getKey, getKey, getMessageProcessor, getPeerHostPort, getPort, getRawIpSourceAddress, getViaHeader, getViaHostPort, logMessage, logResponse, sendMessage, sendMessage, setEncapsulatedClientTransactionclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncapsulatedClientTransactionprotected NioTlsMessageChannel(NioTcpMessageProcessor nioTcpMessageProcessor, SocketChannel socketChannel) throws IOException
IOExceptionpublic NioTlsMessageChannel(InetAddress inetAddress, int port, SIPTransactionStack sipStack, NioTcpMessageProcessor nioTcpMessageProcessor) throws IOException
IOExceptionpublic void init(boolean clientMode)
throws Exception,
CertificateException,
FileNotFoundException,
IOException
public ByteBuffer prepareEncryptedDataBuffer()
NioTlsChannelInterfaceprepareEncryptedDataBuffer in interface NioTlsChannelInterfacepublic ByteBuffer prepareAppDataBuffer()
NioTlsChannelInterfaceprepareAppDataBuffer in interface NioTlsChannelInterfacepublic ByteBuffer prepareAppDataBuffer(int capacity)
NioTlsChannelInterfaceprepareAppDataBuffer in interface NioTlsChannelInterfaceprotected void sendMessage(byte[] msg,
boolean isClient)
throws IOException
NioTcpMessageChannelsendMessage in class NioTcpMessageChannelmsg - 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 NioTcpMessageChannelmessage - Pre-formatted message to send.receiverAddress - Address to send it to.receiverPort - Receiver port.IOException - If there is a problem connecting or sending.protected void createBuffers()
protected void addBytes(byte[] bytes)
throws Exception
addBytes in class NioTcpMessageChannelExceptionpublic String getTransport()
NioTcpMessageChannelgetTransport in class NioTcpMessageChannelpublic void onNewSocket(byte[] message)
onNewSocket in class NioTcpMessageChannelpublic boolean isSecure()
NioTcpMessageChannelisSecure in class NioTcpMessageChannelpublic void addPlaintextBytes(byte[] bytes)
throws Exception
NioTlsChannelInterfaceaddPlaintextBytes in interface NioTlsChannelInterfaceExceptionpublic void setHandshakeCompletedListener(HandshakeCompletedListener handshakeCompletedListenerImpl)
public HandshakeCompletedListenerImpl getHandshakeCompletedListener()
public boolean isHandshakeCompleted()
public void setHandshakeCompleted(boolean handshakeCompleted)
handshakeCompleted - the handshakeCompleted to setpublic SipStackImpl getSIPStack()
ConnectionOrientedMessageChannelgetSIPStack in interface NioTlsChannelInterfacegetSIPStack in class ConnectionOrientedMessageChannelCopyright © 2018. All Rights Reserved.