@ SuppressWarnings ( "unchecked" ) public < T extends Item > void publish ( T item ) throws NoResponseException , XMPPErrorException , NotConnectedException , InterruptedException { Collection < T > items = new ArrayList <> ( 1 ) ; items . add ( ( item == null ? ( T ) new Item ( ) : item ) ) ; publish ( items ) ; }
Publishes an event to the node . This can be either a simple item with no payload or one with it . This is determined by the Node configuration .