Package rocks.xmpp.extensions.pubsub.model

Examples of rocks.xmpp.extensions.pubsub.model.PubSub$Unsubscribe


    public void resume() throws JBIException {
        request(new ResumeSubscription());
    }

    public void unsubscribe() throws JBIException {
        request(new Unsubscribe());
    }
View Full Code Here


        renew.setTerminationTime(terminationTime);
        subscription.renew(renew);
    }

    public void unsubscribe() throws UnableToDestroySubscriptionFault, ResourceUnknownFault {
        subscription.unsubscribe(new Unsubscribe());
    }
View Full Code Here

    }

    @Override
    protected void stopSubscription(Object sub) {
        try {
            ((SubscriptionManager) sub).unsubscribe(new Unsubscribe());
        } catch (Exception e) {
            LOGGER.log(Level.INFO, "Error while unsubscribing on-demand publisher", e);
        }
    }
View Full Code Here

  public void resume() throws JBIException {
    request(new ResumeSubscription());
  }
 
  public void unsubscribe() throws JBIException {
    request(new Unsubscribe());
  }
View Full Code Here

        renew.setTerminationTime(terminationTime);
        subscription.renew(renew);
    }

    public void unsubscribe() throws UnableToDestroySubscriptionFault, ResourceUnknownFault {
        subscription.unsubscribe(new Unsubscribe());
    }
View Full Code Here

    }

    @Override
    protected void stopSubscription(Object sub) {
        try {
            ((SubscriptionManager) sub).unsubscribe(new Unsubscribe());
        } catch (Exception e) {
            LOGGER.log(Level.INFO, "Error while unsubscribing on-demand publisher", e);
        }
    }
View Full Code Here

     * @throws rocks.xmpp.core.session.NoResponseException  If the entity did not respond.
     * @see <a href="http://xmpp.org/extensions/xep-0060.html#entity-subscriptions">5.6 Retrieve Subscriptions</a>
     */
    private List<Subscription> getSubscriptions() throws XmppException {
        IQ result = xmppSession.query(new IQ(service, IQ.Type.GET, PubSub.withSubscriptions()));
        PubSub pubSub = result.getExtension(PubSub.class);
        return pubSub.getSubscriptions();
    }
View Full Code Here

     * @throws rocks.xmpp.core.session.NoResponseException  If the entity did not respond.
     * @see <a href="http://xmpp.org/extensions/xep-0060.html#entity-affiliations">5.7 Retrieve Affiliations</a>
     */
    private List<Affiliation> getAffiliations() throws XmppException {
        IQ result = xmppSession.query(new IQ(service, IQ.Type.GET, PubSub.withAffiliations()));
        PubSub pubSub = result.getExtension(PubSub.class);
        return pubSub.getAffiliations();
    }
View Full Code Here

     * @throws rocks.xmpp.core.session.NoResponseException  If the entity did not respond.
     * @see <a href="http://xmpp.org/extensions/xep-0060.html#subscriber-configure-submit">6.4 Request Default Subscription Configuration Options</a>
     */
    private DataForm getDefaultSubscriptionOptions() throws XmppException {
        IQ result = xmppSession.query(new IQ(service, IQ.Type.GET, PubSub.withDefault()));
        PubSub pubSub = result.getExtension(PubSub.class);
        return pubSub.getDefault().getDataForm();
    }
View Full Code Here

        super(IQ.class, PubSub.class);
    }

    @Test
    public void marshalPublish() throws JAXBException, XMLStreamException {
        PubSub pubSub = PubSub.withPublish("princely_musings", "bnd81g37d61f49fgn581", null);
        String xml = marshal(pubSub);
        Assert.assertEquals(xml, "<pubsub xmlns=\"http://jabber.org/protocol/pubsub\"><publish node=\"princely_musings\"><item id=\"bnd81g37d61f49fgn581\"></item></publish></pubsub>");
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.pubsub.model.PubSub$Unsubscribe

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.