code: public synchronized void checkIn(SocketBox sb) {
  
          if (((ManagedSocketBox) sb).getStatus() != ManagedSocketBox.BUSY) {
              throw new IllegalArgumentException("The socket      is already marked free, cannot check it in twice.");
          }
  
          if (!busySockets.containsKey(sb)) {
              throw new IllegalArgumentException("This socket does not exist in the pool of busy sockets.");
          }
  
          if (freeSockets.containsKey(sb)) {
              throw new IllegalArgumentException("This socket already exists in the pool of free sockets.");
          }
  
          if (! ((ManagedSocketBox)sb).isReusable()) {
  
              throw new IllegalArgumentException("This socket is not reusable; cannot check in.");
  
          }
  
          ((ManagedSocketBox) sb).setStatus(ManagedSocketBox.FREE);
          busySockets.remove(sb);
          freeSockets.put(sb, sb);
  
      }
docs: Before calling this method, the socket needs to be first add()ed to the pool and checked out. Note: checking in a
  socket that is not reusable will cause its removal from the pool.