/** * Get the options for configuring the specified subscription. * * @param jid JID the subscription is registered under * @param subscriptionId The subscription id * @return The subscription option form * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException */ public SubscribeForm getSubscriptionOptions(String jid, String subscriptionId) throws NoResponseException, XMPPErrorException, NotConnectedException { PubSub packet = (PubSub) sendPubsubPacket(Type.get, new OptionsExtension(jid, getId(), subscriptionId)); FormNode ext = (FormNode) packet.getExtension(PubSubElementType.OPTIONS); return new SubscribeForm(ext.getForm()); }
/** * Remove the node from its parent and deletes it. The default implementation obtains write access * to the {@link Children#MUTEX children's lock}, and removes the node from its parent(if any). * Also fires a property change. * * <p>This may be overridden by subclasses to do any additional cleanup. * * @exception java.io.IOException if something fails */ @Override public void destroy() throws java.io.IOException { if (component.getNodeReference() == this) { if (MetaComponentCreator.isTransparentLayoutComponent(component.getParentComponent())) { component = component.getParentComponent(); } if (EventQueue.isDispatchThread()) { component.getFormModel().removeComponent(component, true); } else { EventQueue.invokeLater( new Runnable() { @Override public void run() { component.getFormModel().removeComponent(component, true); } }); } } // otherwise the component was likely already removed with a parent component super.destroy(); }