code: public String registerChaincodeEventListener(Pattern chaincodeId, Pattern eventName, ChaincodeEventListener chaincodeEventListener) throws InvalidArgumentException {
  
          if (shutdown) {
              throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
          }
  
          if (chaincodeId == null) {
              throw new InvalidArgumentException("The chaincodeId argument may not be null.");
          }
  
          if (eventName == null) {
              throw new InvalidArgumentException("The eventName argument may not be null.");
          }
  
          if (chaincodeEventListener == null) {
              throw new InvalidArgumentException("The chaincodeEventListener argument may not be null.");
          }
  
          ChaincodeEventListenerEntry chaincodeEventListenerEntry = new ChaincodeEventListenerEntry(chaincodeId, eventName, chaincodeEventListener);
          synchronized (this) {
              if (null == blh) {
                  blh = registerChaincodeListenerProcessor();
              }
          }
          return chaincodeEventListenerEntry.handle;
  
      }
docs: Register a chaincode event listener. Both chaincodeId pattern AND eventName pattern must match to invoke
  the chaincodeEventListener
  
  @param chaincodeId            Java pattern for chaincode identifier also know as chaincode name. If ma
  @param eventName              Java pattern to match the event name.
  @param chaincodeEventListener The listener to be invoked if both chaincodeId and eventName pattern matches.
  @return Handle to be used to unregister the event listener {@link #unregisterChaincodeEventListener(String)}
  @throws InvalidArgumentException