private Presence enter$324fb5b(String nickname, long timeout) throws NotConnectedException, NoResponseException, XMPPErrorException { if (StringUtils.isNullOrEmpty(nickname)) { throw new IllegalArgumentException("Nickname must not be null or blank."); } Presence joinPresence = new Presence(Type.available); joinPresence.to = this.room + MqttTopic.TOPIC_LEVEL_SEPARATOR + nickname; joinPresence.addExtension(new MUCInitialPresence()); for (PacketInterceptor interceptPacket : this.presenceInterceptors) { interceptPacket.interceptPacket(joinPresence); } PacketCollector response = this.connection.createPacketCollector( new AndFilter( FromMatchesFilter.createFull( this.room + MqttTopic.TOPIC_LEVEL_SEPARATOR + nickname), new PacketTypeFilter(Presence.class))); this.connection.sendPacket(joinPresence); Presence presence = (Presence) response.nextResultOrThrow(timeout); this.nickname = nickname; this.joined = true; List<String> rooms = (List) joinedRooms.get(this.connection); if (rooms == null) { rooms = new ArrayList(); joinedRooms.put(this.connection, rooms); } rooms.add(this.room); return presence; }
private OnceForThisStanza(XMPPTCPConnection xMPPTCPConnection, Stanza stanza) { this.connection = xMPPTCPConnection; this.id = stanza.getStanzaId(); if (StringUtils.isNullOrEmpty(this.id)) { throw new IllegalArgumentException("Stanza ID must be set"); } }
public boolean accept(Stanza stanza) { CharSequence stanzaId = stanza.getStanzaId(); if (StringUtils.isNullOrEmpty(stanzaId) || !this.id.equals(stanzaId)) { return false; } this.connection.removeRequestAckPredicate(this); return true; }
public XMPPError( Condition condition, String str, String str2, Type type, Map<String, String> map, List<ExtensionElement> list) { super(map, NAMESPACE, list); this.condition = condition; if (StringUtils.isNullOrEmpty(str)) { str = null; } if (str != null) { switch (C26771.$SwitchMap$org$jivesoftware$smack$packet$XMPPError$Condition[ condition.ordinal()]) { case VideoSize.CIF /*1*/: case VideoSize.HVGA /*2*/: break; default: throw new IllegalArgumentException( "Condition text can only be set with condtion types 'gone' and 'redirect', not " + condition); } } this.conditionText = str; this.errorGenerator = str2; if (type == null) { Type type2 = (Type) CONDITION_TO_TYPE.get(condition); if (type2 == null) { LOGGER.warning("Could not determine type for condition: " + condition); type2 = Type.CANCEL; } this.type = type2; return; } this.type = type; }