code: public static ConnectionHandler register(final String id, 
                                               final ConnectionHandler handler) {
  
          if (id == null || id.length() == 0) {
              throw new IllegalArgumentException("Invalid ID: " + id);
          } // end of if
  
          if (handler == null) {
              throw new IllegalArgumentException("Invalid handler: " + handler);
          } // end of if
  
          // ---
  
          return handlers.put(id, handler);
      }
docs: Registers a connection handler.
  
  @param id Handler unique ID
  @param handler Connection handler
  @return Handler previously registered for |id|, or null if none
  @throws IllegalArgumentException if |id| or |handler| is null (or empty)
  @see #unregister