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

uk.org.retep.xmpp.muc.builder.AbsentMucRoomLogicBuilder 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 uk.org.retep.xmpp.builder.AbstractProtocolLogicSetBuilder;
import uk.org.retep.xmpp.builder.XMPPLogicBuilder;
import uk.org.retep.xmpp.muc.MucRoom;
import uk.org.retep.xmpp.muc.MucService;
import uk.org.retep.xmpp.muc.room.JoinNewRoomLogic;

/**
 * {@link XMPPLogicBuilder} implementation for building logic for handling rooms
 * that do not exist
 * 
 * @author peter
 * @since 9.12
 */
public class AbsentMucRoomLogicBuilder
        extends AbstractProtocolLogicSetBuilder
{

    /**
     * Use {@link MucServiceBuilder#getAbsentMucRoomLogicBuilder()}
     */
    public AbsentMucRoomLogicBuilder()
    {
    }

    /**
     * Adds the various components needed for a basic Muc implementation.
     *
     * @param  Type of this builder
     * @return this instance
     */
    @Override
    public  T addDefaultLogic()
    {
        addJoinNewRoomLogic();
        @SuppressWarnings( "unchecked" )
        final T ret = (T) this;
        return ret;
    }

    /**
     * Adds logic which enables a room to be created
     *
     * @return this instance
     */
    public AbsentMucRoomLogicBuilder addJoinNewRoomLogic()
    {
        return addXMPPLogic( JoinNewRoomLogic.getInstance() );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy