docs: public void registerPort(TCPPort endPoint) throws IOException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "registerPort: " + endPoint.getServerSocket());
          }
  
          synchronized (this) {
  
              EndPointActionInfo work = new EndPointActionInfo(REGISTER_ENDPOINT, endPoint, workSync);
  
              if ((!dedicatedAcceptThread) && (!waitToAccept)) {
                  if (sharedAccept == null) {
                      sharedAccept = new NBAcceptChannelSelector(waitToAccept);
                      sharedThread = new Thread(sharedAccept);
  
                      sharedThread.setName("Shared TCPChannel NonBlocking Accept Thread");
                      // all TCPChannel Thread should be daemon threads
                      sharedThread.setDaemon(true);
                      sharedThread.start();
                  }
                  synchronized (workSync) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                          Tr.event(this, tc, "Passing register to selector; " + endPoint.getServerSocket());
                      }
                      try {
                          sharedAccept.addWork(work);
                          workSync.wait();
                      } catch (InterruptedException x) {
                          // nothing to do
                      }
                  } // end-sync
                  endPointToAccept.put(endPoint, sharedAccept);
  
              } else {
                  // Add a new dedicated accept
                  NBAcceptChannelSelector dedicatedAccept = new NBAcceptChannelSelector(waitToAccept);
                  Thread dedicatedThread = new Thread(dedicatedAccept);
  
                  dedicatedThread.setName("Dedicated TCPChannel NonBlocking Accept Thread:" + endPoint.getListenPort());
                  // all TCPChannel Thread should be daemon threads
                  dedicatedThread.setDaemon(true);
                  dedicatedThread.start();
  
                  // Need a new sync, since the wait will give up control and
                  // we don't want the removePort to gain control at this point.
                  synchronized (workSync) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                          Tr.event(this, tc, "Passing register to dedicated selector; " + endPoint.getServerSocket());
                      }
                      try {
                          dedicatedAccept.addWork(work);
                          workSync.wait();
                      } catch (InterruptedException x) {
                          // nothing to do
                      }
                  } // end-sync
                  endPointToAccept.put(endPoint, dedicatedAccept);
              }
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "registerPort");
          }
      }