/**
  * Get an identifying key. This key is used to cache the connection and re-use it if necessary.
  */
 public String getKey() {
   if (this.key != null) {
     return this.key;
   } else {
     this.key = MessageChannel.getKey(this.peerAddress, this.peerPort, "TLS");
     return this.key;
   }
 }
 /**
  * Constructor - connects to the given inet address. Acknowledgement -- Lamine Brahimi (IBM
  * Zurich) sent in a bug fix for this method. A thread was being uncessarily created.
  *
  * @param inetAddr inet address to connect to.
  * @param sipStack is the sip stack from which we are created.
  * @throws IOException if we cannot connect.
  */
 protected TLSMessageChannel(
     InetAddress inetAddr,
     int port,
     SIPMessageStack sipStack,
     TLSMessageProcessor messageProcessor)
     throws IOException {
   if (LogWriter.needsLogging) {
     sipStack.logWriter.logMessage("creating new TLSMessageChannel ");
     sipStack.logWriter.logStackTrace();
   }
   this.peerAddress = inetAddr;
   this.peerPort = port;
   this.myPort = messageProcessor.getPort();
   this.peerProtocol = "TLS";
   this.stack = sipStack;
   this.tlsMessageProcessor = messageProcessor;
   this.myAddress = sipStack.getHostAddress();
   // Bug report by Vishwashanti Raj Kadiayl
   this.key = MessageChannel.getKey(peerAddress, peerPort, "TLS");
   super.messageProcessor = messageProcessor;
 }