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

uk.org.retep.xmpp.muc.MucValidator 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;

import uk.org.retep.util.messaging.MessageException;
import uk.org.retep.xmpp.message.ErrorCondition;
import uk.org.retep.xmpp.message.Message;

/**
 *
 * @author peter
 */
public interface MucValidator
{

    /**
     * Hook to allow subclasses to validate the message.
     *
     * 

* The default implementation simply returns ErrorCondition.OK as we * permit all messages to be relayed, however as per XEP-0045 7.9: * * a service MAY ignore or reject messages that do not have a type of * "groupchat" * *

* * @param sender MucRoomMember of the sender * @param room MucRoom * @param message Message to send * @return ErrorCondition.OK to allow relay, any other value to respond * with the appropriate Error to the sender * @throws MessageException */ ErrorCondition validateMessage( final MucRoomMember sender, final MucRoom room, final Message message ) throws MessageException; ErrorCondition validateSender( final MucRoomMember sender, final MucService service, final MucRoom room, final Message message ) throws MessageException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy