All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.org.retep.xmpp.muc.builder.MucRoomSetBuilder Maven / Gradle / Ivy

There is a newer version: 10.6
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.org.retep.xmpp.muc.builder;

import javax.annotation.Nonnull;
import uk.org.retep.xmpp.JID;
import uk.org.retep.util.builder.impl.AbstractBuilder;
import uk.org.retep.xmpp.muc.MucRoomSet;
import uk.org.retep.xmpp.muc.beans.BasicMucRoomSet;

/**
 * Builder to create a {@link MucRoomSet}.
 *
 * 

* This will simply create a {@link BasicMucRoomSet} but subclasses may * build custom implementations. *

* * @author peter * @since 9.12 */ public class MucRoomSetBuilder extends AbstractBuilder { private JID serviceJid; /** * Set's the serviceJid for this {@link MucRoomSet}. * * This is set by {@link MucServiceBuilder} during the build phase * so that the instance is the same one used by the service being built. * * @param serviceJid JID of the service * @return */ final B setServiceJid( @Nonnull final JID serviceJid ) { this.serviceJid = serviceJid; return getThis(); } /** * The serviceJid set during the build phase of a MucService. * *

* Subclasses should use this method if they subclass this builder. *

* * @return service JID */ @Nonnull protected final JID getServiceJid() { return serviceJid; } /**] * {@inheritDoc} */ @Override public MucRoomSet build() { if( serviceJid == null ) { throw new IllegalArgumentException( "serviceJid not set" ); } return new BasicMucRoomSet( serviceJid ); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy