code: public String registerBlockListener(BlockListener listener) throws InvalidArgumentException {
  
          if (shutdown) {
              throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
          }
  
          if (null == listener) {
              throw new InvalidArgumentException("Listener parameter is null.");
          }
  
          String handle = new BL(listener).getHandle();
  
          logger.trace(format("Register event BlockEvent listener %s", handle));
  
          return handle;
  
      }
docs: Register a block listener.
  
  @param listener function with single argument with type {@link BlockEvent}
  @return The handle of the registered block listener.
  @throws InvalidArgumentException if the channel is shutdown.