code: public void subscribeToViewEvent(Class<? extends SystemEvent> systemEvent,
                                       SystemEventListener listener) {
  
          if (systemEvent == null) {
              throw new NullPointerException();
          }
          if (listener == null) {
              throw new NullPointerException();
          }
          
          if (viewListeners == null) {
              viewListeners = new HashMap<Class<? extends SystemEvent>, List<SystemEventListener>>(4, 1.0f);
          }
          List<SystemEventListener> listeners = viewListeners.get(systemEvent);
          if (listeners == null) {
              listeners = new CopyOnWriteArrayList<SystemEventListener>();
              viewListeners.put(systemEvent, listeners);
          }
          listeners.add(listener);
  
      }
docs: <p class="changed_added_2_0">Install the listener instance
  referenced by argument <code>listener</code> into the
  <code>UIViewRoot</code> as a listener for events of type
  <code>systemEventClass</code>.</p>
  
  <p>Note that installed listeners are not maintained as part of the
  <code>UIViewRoot</code>'s state.</p>
  
  @param systemEvent the <code>Class</code> of event for which
  <code>listener</code> must be fired.
  
  @param listener the implementation of {@link
  javax.faces.event.SystemEventListener} whose {@link
  javax.faces.event.SystemEventListener#processEvent} method must
  be called when events of type <code>systemEventClass</code> are
  fired.
  
  @throws <code>NullPointerException</code> if <code>systemEventClass</code>
  or <code>listener</code> are <code>null</code>.
  
  @since 2.0