code: public void onPipeConnectionEvent(PipeConnectionEvent event) {
          switch (event.getType()) {
              case PROVIDER_CONNECT_PUSH:
                  if (event.getProvider() != this) {
                      if (waitLiveJob != null) {
                          schedulingService.removeScheduledJob(waitLiveJob);
                          waitLiveJob = null;
                      }
                      sendPublishedStatus(currentItem.get());
                  }
                  break;
              case PROVIDER_DISCONNECT:
                  if (pullMode) {
                      sendStopStatus(currentItem.get());
                  } else {
                      sendUnpublishedStatus(currentItem.get());
                  }
                  break;
              case CONSUMER_CONNECT_PULL:
                  if (event.getConsumer() == this) {
                      pullMode = true;
                  }
                  break;
              case CONSUMER_CONNECT_PUSH:
                  if (event.getConsumer() == this) {
                      pullMode = false;
                  }
                  break;
              default:
                  if (log.isDebugEnabled()) {
                      log.debug("Unhandled pipe event: {}", event);
                  }
          }
      }
docs: {@inheritDoc}