Examples of Decline


Examples of com.sissi.protocol.muc.Decline

*/
public class MessageDeclineProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Decline decline = protocol.cast(Message.class).getMuc().getDecline();
    super.findOne(super.build(decline.getTo()), true).write(this.prepare(context, protocol.cast(Message.class), decline).reply());
    return true;
  }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.Decline

        // add occupants to the room
        Room room = conference.findOrCreateRoom(ROOM1_JID, "Room 1");
        room.addOccupant(OCCUPANT2_JID, "nick");

        Decline decline = new Decline(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(decline), null);
        assertNull(error);

        X expectedX = new X(new Decline(OCCUPANT1_JID, null, reason));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX,
                occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.Decline

    }

    public static Stanza createDeclineMessageStanza(Stanza original) throws EntityFormatException {
        X orginalX = X.fromStanza(original);
       
        Decline decline = orginalX.getDecline();
        if(decline == null  || decline.getTo() == null) {
            throw new IllegalArgumentException("Invalid decline element, must exist and contain to attribute");
        }
       
        Decline newDecline = new Decline(original.getFrom(), null, decline.getReason());
        return createInviteDeclineMessageStanza(original, decline.getTo(), null, newDecline);
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.Decline

    }

    public static Stanza createDeclineMessageStanza(Stanza original) throws EntityFormatException {
        X orginalX = X.fromStanza(original);

        Decline decline = orginalX.getDecline();
        if (decline == null || decline.getTo() == null) {
            throw new IllegalArgumentException("Invalid decline element, must exist and contain to attribute");
        }

        Decline newDecline = new Decline(original.getFrom(), null, decline.getReason());
        return createInviteDeclineMessageStanza(original, decline.getTo(), null, newDecline);
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.Decline

        // add occupants to the room
        Room room = conference.findOrCreateRoom(ROOM1_JID, "Room 1");
        room.addOccupant(OCCUPANT2_JID, "nick");

        Decline decline = new Decline(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(NamespaceURIs.XEP0045_MUC_USER, decline), null);
        assertNull(error);

        X expectedX = new X(new Decline(OCCUPANT1_JID, null, reason));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX, occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.Decline

        // add occupants to the room
        Room room = conference.findOrCreateRoom(ROOM1_JID, "Room 1");
        room.addOccupant(OCCUPANT2_JID, "nick");

        Decline decline = new Decline(null, OCCUPANT2_JID, reason);
        // send message to occupant 1
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM1_JID, null, null, new X(decline), null);
        assertNull(error);

        X expectedX = new X(new Decline(OCCUPANT1_JID, null, reason));
        // verify stanzas to existing occupants on the exiting user
        assertMessageStanza(ROOM1_JID, OCCUPANT2_JID, null, null, null, expectedX, occupant2Queue.getNext());
        assertNull(occupant1Queue.getNext());
    }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.user.Decline

                                notifyMessageListeners(new MessageEvent(ChatRoom.this, message, true));
                            }
                        } else {
                            MucUser mucUser = message.getExtension(MucUser.class);
                            if (mucUser != null) {
                                Decline decline = mucUser.getDecline();
                                if (decline != null) {
                                    notifyInvitationDeclineListeners(new InvitationDeclineEvent(ChatRoom.this, roomJid, decline.getFrom(), decline.getReason()));
                                }
                            }
                        }
                    }
                }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.user.Decline

        // If the contact declines the invitation, it shall silently discard the invitation.

        // Therefore only decline mediated invitations.
        if (mediated) {
            Message message = new Message(room);
            message.getExtensions().add(new Decline(inviter, reason));
            xmppSession.send(message);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.