code: public <T extends Item> void publish(Collection<T> items) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          PubSub packet = createPubsubPacket(Type.set, new PublishItem<>(getId(), items));
  
          pubSubManager.getConnection().createStanzaCollectorAndSend(packet).nextResultOrThrow();
      }
docs: Publishes multiple events to the node.  Same rules apply as in {@link #send(Item)}.
  
  In addition, if {@link ConfigureForm#isPersistItems()}=false, only the last item in the input
  list will get stored on the node, assuming it stores the last sent item.
  
  @param items - The collection of {@link Item} objects being sent
  @param <T> type of the items.
  
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException