public LeafNode getLeafNode ( String id ) throws NotALeafNodeException , NoResponseException , NotConnectedException , InterruptedException , XMPPErrorException , NotAPubSubNodeException { Node node ; try { node = getNode ( id ) ; } catch ( XMPPErrorException e ) { if ( e . getStanzaError ( ) . getCondition ( ) == Condition . service_unavailable ) { // This could be caused by Prosody bug #805 (see https://prosody.im/issues/issue/805). Prosody does not // answer to disco#info requests on the node ID, which makes it undecidable if a node is a leaf or // collection node. return getLeafNodeProsodyWorkaround ( id ) ; } throw e ; } if ( node instanceof LeafNode ) { return ( LeafNode ) node ; } throw new PubSubException . NotALeafNodeException ( id , pubSubService ) ; }
Try to get a leaf node with the given node ID .