});
MenuItem pubSubItem = new MenuItem("PubSub");
pubSubItem.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
PubSubManager pubSubManager = xmppSession.getExtensionManager(PubSubManager.class);
ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getExtensionManager(ServiceDiscoveryManager.class);
try {
ItemNode infoNode = serviceDiscoveryManager.discoverItems(null);
int i = 0;
} catch (XmppException e) {