1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-11 18:19:38 +02:00

Bump jxmpp to 0.5.0-alpha4

This commit is contained in:
Florian Schmaus 2015-05-27 19:29:51 +02:00
parent 8840236b72
commit c125a3b055
49 changed files with 208 additions and 208 deletions

View file

@ -65,7 +65,7 @@ public class MultipleRecipientInfo {
* @return the JID of a MUC room to which responses should be sent or <tt>null</tt> if
* no specific address was provided.
*/
// TODO should return BareJid
// TODO should return EntityBareJid
public Jid getReplyRoom() {
List<MultipleAddresses.Address> replyRoom = extension.getAddressesOfType(MultipleAddresses.Type.replyroom);
return replyRoom.isEmpty() ? null : replyRoom.get(0).getJid();

View file

@ -28,9 +28,9 @@ import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.address.packet.MultipleAddresses;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;
import java.util.ArrayList;
@ -178,9 +178,9 @@ public class MultipleRecipientManager {
to.add(original.getFrom());
}
// Remove the sender from the TO/CC list (try with bare JID too)
FullJid from = connection.getUser();
EntityFullJid from = connection.getUser();
if (!to.remove(from) && !cc.remove(from)) {
BareJid bareJID = from.asBareJid();
EntityBareJid bareJID = from.asBareJid();
to.remove(bareJID);
cc.remove(bareJID);
}

View file

@ -28,7 +28,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smackx.iqprivate.PrivateDataManager;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.parts.Resourcepart;
@ -111,7 +111,7 @@ public final class BookmarkManager {
* @throws NotConnectedException
* @throws InterruptedException
*/
public void addBookmarkedConference(String name, BareJid jid, boolean isAutoJoin,
public void addBookmarkedConference(String name, EntityBareJid jid, boolean isAutoJoin,
Resourcepart nickname, String password) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
retrieveBookmarks();
@ -146,7 +146,7 @@ public final class BookmarkManager {
* @throws IllegalArgumentException thrown when the conference being removed is a shared
* conference
*/
public void removeBookmarkedConference(BareJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
public void removeBookmarkedConference(EntityBareJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
retrieveBookmarks();
Iterator<BookmarkedConference> it = bookmarks.getBookmarkedConferences().iterator();
while(it.hasNext()) {

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.bookmarks;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.parts.Resourcepart;
/**
@ -29,17 +29,17 @@ public class BookmarkedConference implements SharedBookmark {
private String name;
private boolean autoJoin;
private final BareJid jid;
private final EntityBareJid jid;
private Resourcepart nickname;
private String password;
private boolean isShared;
protected BookmarkedConference(BareJid jid) {
protected BookmarkedConference(EntityBareJid jid) {
this.jid = jid;
}
protected BookmarkedConference(String name, BareJid jid, boolean autoJoin, Resourcepart nickname,
protected BookmarkedConference(String name, EntityBareJid jid, boolean autoJoin, Resourcepart nickname,
String password)
{
this.name = name;
@ -81,7 +81,7 @@ public class BookmarkedConference implements SharedBookmark {
*
* @return the full JID of this conference room.
*/
public BareJid getJid() {
public EntityBareJid getJid() {
return jid;
}

View file

@ -20,7 +20,7 @@ import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jivesoftware.smackx.iqprivate.packet.PrivateData;
import org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.parts.Resourcepart;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@ -271,7 +271,7 @@ public class Bookmarks implements PrivateData {
private static BookmarkedConference getConferenceStorage(XmlPullParser parser) throws XmlPullParserException, IOException {
String name = parser.getAttributeValue("", "name");
String autojoin = parser.getAttributeValue("", "autojoin");
BareJid jid = ParserUtils.getBareJidAttribute(parser);
EntityBareJid jid = ParserUtils.getBareJidAttribute(parser);
BookmarkedConference conf = new BookmarkedConference(jid);
conf.setName(name);

View file

@ -24,7 +24,7 @@ import org.jivesoftware.smack.iqrequest.IQRequestHandler.Mode;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smackx.si.packet.StreamInitiation;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import java.util.List;
import java.util.Map;
@ -33,7 +33,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
/**
* The file transfer manager class handles the sending and recieving of files.
* To send a file invoke the {@link #createOutgoingFileTransfer(FullJid)} method.
* To send a file invoke the {@link #createOutgoingFileTransfer(EntityFullJid)} method.
* <p>
* And to recieve a file add a file transfer listener to the manager. The
* listener will notify you when there is a new file transfer request. To create
@ -117,7 +117,7 @@ public final class FileTransferManager extends Manager {
* @return The send file object on which the negotiated transfer can be run.
* @exception IllegalArgumentException if userID is null or not a full JID
*/
public OutgoingFileTransfer createOutgoingFileTransfer(FullJid userID) {
public OutgoingFileTransfer createOutgoingFileTransfer(EntityFullJid userID) {
// We need to create outgoing file transfers with a full JID since this method will later
// use XEP-0095 to negotiate the stream. This is done with IQ stanzas that need to be addressed to a full JID
// in order to reach an client entity.

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.muc;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.parts.Resourcepart;
@ -32,49 +32,49 @@ import org.jxmpp.jid.parts.Resourcepart;
*/
public class DefaultParticipantStatusListener implements ParticipantStatusListener {
public void joined(FullJid participant) {
public void joined(EntityFullJid participant) {
}
public void left(FullJid participant) {
public void left(EntityFullJid participant) {
}
public void kicked(FullJid participant, Jid actor, String reason) {
public void kicked(EntityFullJid participant, Jid actor, String reason) {
}
public void voiceGranted(FullJid participant) {
public void voiceGranted(EntityFullJid participant) {
}
public void voiceRevoked(FullJid participant) {
public void voiceRevoked(EntityFullJid participant) {
}
public void banned(FullJid participant, Jid actor, String reason) {
public void banned(EntityFullJid participant, Jid actor, String reason) {
}
public void membershipGranted(FullJid participant) {
public void membershipGranted(EntityFullJid participant) {
}
public void membershipRevoked(FullJid participant) {
public void membershipRevoked(EntityFullJid participant) {
}
public void moderatorGranted(FullJid participant) {
public void moderatorGranted(EntityFullJid participant) {
}
public void moderatorRevoked(FullJid participant) {
public void moderatorRevoked(EntityFullJid participant) {
}
public void ownershipGranted(FullJid participant) {
public void ownershipGranted(EntityFullJid participant) {
}
public void ownershipRevoked(FullJid participant) {
public void ownershipRevoked(EntityFullJid participant) {
}
public void adminGranted(FullJid participant) {
public void adminGranted(EntityFullJid participant) {
}
public void adminRevoked(FullJid participant) {
public void adminRevoked(EntityFullJid participant) {
}
public void nicknameChanged(FullJid participant, Resourcepart newNickname) {
public void nicknameChanged(EntityFullJid participant, Resourcepart newNickname) {
}
}

View file

@ -23,9 +23,9 @@ import org.jxmpp.jid.Jid;
* Hosted rooms by a chat service may be discovered if they are configured to appear in the room
* directory . The information that may be discovered is the XMPP address of the room and the room
* name. The address of the room may be used for obtaining more detailed information
* {@link org.jivesoftware.smackx.muc.MultiUserChatManager#getRoomInfo(org.jxmpp.jid.BareJid)}
* {@link org.jivesoftware.smackx.muc.MultiUserChatManager#getRoomInfo(org.jxmpp.jid.EntityBareJid)}
* or could be used for joining the room
* {@link org.jivesoftware.smackx.muc.MultiUserChatManager#getMultiUserChat(org.jxmpp.jid.BareJid)}
* {@link org.jivesoftware.smackx.muc.MultiUserChatManager#getMultiUserChat(org.jxmpp.jid.EntityBareJid)}
* and {@link org.jivesoftware.smackx.muc.MultiUserChat#join(org.jxmpp.jid.parts.Resourcepart)}.
*
* @author Gaston Dombiak

View file

@ -72,17 +72,17 @@ import org.jivesoftware.smackx.muc.packet.MUCUser.Status;
import org.jivesoftware.smackx.xdata.Form;
import org.jivesoftware.smackx.xdata.FormField;
import org.jivesoftware.smackx.xdata.packet.DataForm;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.JidWithLocalpart;
import org.jxmpp.jid.EntityJid;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.jid.parts.Resourcepart;
import org.jxmpp.util.cache.ExpirationCache;
/**
* A MultiUserChat room (XEP-45), created with {@link MultiUserChatManager#getMultiUserChat(BareJid)}.
* A MultiUserChat room (XEP-45), created with {@link MultiUserChatManager#getMultiUserChat(EntityBareJid)}.
* <p>
* A MultiUserChat is a conversation that takes place among many users in a virtual
* room. A room could have many occupants with different affiliation and roles.
@ -105,9 +105,9 @@ public class MultiUserChat {
100, 1000 * 60 * 60 * 24);
private final XMPPConnection connection;
private final BareJid room;
private final EntityBareJid room;
private final MultiUserChatManager multiUserChatManager;
private final Map<FullJid, Presence> occupantsMap = new ConcurrentHashMap<>();
private final Map<EntityFullJid, Presence> occupantsMap = new ConcurrentHashMap<>();
private final Set<InvitationRejectionListener> invitationRejectionListeners = new CopyOnWriteArraySet<InvitationRejectionListener>();
private final Set<SubjectUpdatedListener> subjectUpdatedListeners = new CopyOnWriteArraySet<SubjectUpdatedListener>();
@ -140,7 +140,7 @@ public class MultiUserChat {
private boolean joined = false;
private PacketCollector messageCollector;
MultiUserChat(XMPPConnection connection, BareJid room, MultiUserChatManager multiUserChatManager) {
MultiUserChat(XMPPConnection connection, EntityBareJid room, MultiUserChatManager multiUserChatManager) {
this.connection = connection;
this.room = room;
this.multiUserChatManager = multiUserChatManager;
@ -162,7 +162,7 @@ public class MultiUserChat {
subjectListener = new StanzaListener() {
public void processPacket(Stanza packet) {
Message msg = (Message) packet;
FullJid from = msg.getFrom().asFullJidIfPossible();
EntityFullJid from = msg.getFrom().asEntityFullJidIfPossible();
if (from == null) {
LOGGER.warning("Message subject not changed by a full JID: " + msg.getFrom());
return;
@ -180,7 +180,7 @@ public class MultiUserChat {
presenceListener = new StanzaListener() {
public void processPacket(Stanza packet) {
Presence presence = (Presence) packet;
final FullJid from = presence.getFrom().asFullJidIfPossible();
final EntityFullJid from = presence.getFrom().asEntityFullJidIfPossible();
if (from == null) {
LOGGER.warning("Presence not from a full JID: " + presence.getFrom());
return;
@ -277,7 +277,7 @@ public class MultiUserChat {
*
* @return the multi user chat room name.
*/
public BareJid getRoom() {
public EntityBareJid getRoom() {
return room;
}
@ -311,7 +311,7 @@ public class MultiUserChat {
// We enter a room by sending a presence packet where the "to"
// field is in the form "roomName@service/nickname"
Presence joinPresence = new Presence(Presence.Type.available);
final FullJid jid = JidCreate.fullFrom(room, nickname);
final EntityFullJid jid = JidCreate.fullFrom(room, nickname);
joinPresence.setTo(jid);
// Indicate the the client supports MUC
@ -352,7 +352,7 @@ public class MultiUserChat {
// This presence must be send from a full JID. We use the resourcepart of this JID as nick, since the room may
// performed roomnick rewriting
this.nickname = presence.getFrom().asFullJidIfPossible().getResourcepart();
this.nickname = presence.getFrom().asEntityFullJidIfPossible().getResourcepart();
joined = true;
// Update the list of joined rooms
@ -780,7 +780,7 @@ public class MultiUserChat {
* @throws NotConnectedException
* @throws InterruptedException
*/
public void destroy(String reason, BareJid alternateJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
public void destroy(String reason, EntityBareJid alternateJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
MUCOwner iq = new MUCOwner();
iq.setTo(room);
iq.setType(IQ.Type.set);
@ -1002,7 +1002,7 @@ public class MultiUserChat {
if (!joined) {
throw new MucNotJoinedException(this);
}
final FullJid jid = JidCreate.fullFrom(room, nickname);
final EntityFullJid jid = JidCreate.fullFrom(room, nickname);
// We change the nickname by sending a presence packet where the "to"
// field is in the form "roomName@service/nickname"
// We don't have to signal the MUC support again
@ -1455,7 +1455,7 @@ public class MultiUserChat {
* @throws NotConnectedException
* @throws InterruptedException
*/
public void revokeAdmin(JidWithLocalpart jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException {
public void revokeAdmin(EntityJid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException {
changeAffiliationByAdmin(jid, MUCAffiliation.member);
}
@ -1561,7 +1561,7 @@ public class MultiUserChat {
*
* @return a List of the occupants in the group chat.
*/
public List<FullJid> getOccupants() {
public List<EntityFullJid> getOccupants() {
return new ArrayList<>(occupantsMap.keySet());
}
@ -1779,7 +1779,7 @@ public class MultiUserChat {
* created chat.
* @return new Chat for sending private messages to a given room occupant.
*/
public Chat createPrivateChat(FullJid occupant, ChatMessageListener listener) {
public Chat createPrivateChat(EntityFullJid occupant, ChatMessageListener listener) {
return ChatManager.getInstanceFor(connection).createChat(occupant, listener);
}
@ -2020,7 +2020,7 @@ public class MultiUserChat {
MUCRole oldRole,
MUCRole newRole,
boolean isUserModification,
FullJid from) {
EntityFullJid from) {
// Voice was granted to a visitor
if (("visitor".equals(oldRole) || "none".equals(oldRole))
&& "participant".equals(newRole)) {
@ -2146,7 +2146,7 @@ public class MultiUserChat {
MUCAffiliation oldAffiliation,
MUCAffiliation newAffiliation,
boolean isUserModification,
FullJid from) {
EntityFullJid from) {
// First check for revoked affiliation and then for granted affiliations. The idea is to
// first fire the "revoke" events and then fire the "grant" events.
@ -2243,7 +2243,7 @@ public class MultiUserChat {
Set<Status> statusCodes,
boolean isUserModification,
MUCUser mucUser,
FullJid from) {
EntityFullJid from) {
// Check if an occupant was kicked from the room
if (statusCodes.contains(Status.KICKED_307)) {
// Check if this occupant was kicked

View file

@ -50,10 +50,10 @@ import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
import org.jivesoftware.smackx.muc.packet.MUCInitialPresence;
import org.jivesoftware.smackx.muc.packet.MUCUser;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.JidWithLocalpart;
import org.jxmpp.jid.EntityJid;
public final class MultiUserChatManager extends Manager {
private final static String DISCO_NODE = MUCInitialPresence.NAMESPACE + "#rooms";
@ -78,9 +78,9 @@ public final class MultiUserChatManager extends Manager {
XMPPConnection connection = weakRefConnection.get();
if (connection == null)
return Collections.emptyList();
Set<BareJid> joinedRooms = MultiUserChatManager.getInstanceFor(connection).getJoinedRooms();
Set<EntityBareJid> joinedRooms = MultiUserChatManager.getInstanceFor(connection).getJoinedRooms();
List<DiscoverItems.Item> answer = new ArrayList<DiscoverItems.Item>();
for (BareJid room : joinedRooms) {
for (EntityBareJid room : joinedRooms) {
answer.add(new DiscoverItems.Item(room));
}
return answer;
@ -111,14 +111,14 @@ public final class MultiUserChatManager extends Manager {
new NotFilter(MessageTypeFilter.ERROR));
private final Set<InvitationListener> invitationsListeners = new CopyOnWriteArraySet<InvitationListener>();
private final Set<BareJid> joinedRooms = new HashSet<>();
private final Set<EntityBareJid> joinedRooms = new HashSet<>();
/**
* A Map of MUC JIDs to {@link MultiUserChat} instances. We use weak references for the values in order to allow
* those instances to get garbage collected. Note that MultiUserChat instances can not get garbage collected while
* the user is joined, because then the MUC will have PacketListeners added to the XMPPConnection.
*/
private final Map<BareJid, WeakReference<MultiUserChat>> multiUserChats = new HashMap<>();
private final Map<EntityBareJid, WeakReference<MultiUserChat>> multiUserChats = new HashMap<>();
private MultiUserChatManager(XMPPConnection connection) {
super(connection);
@ -131,7 +131,7 @@ public final class MultiUserChatManager extends Manager {
final MUCUser mucUser = MUCUser.from(message);
// Check if the MUCUser extension includes an invitation
if (mucUser.getInvite() != null) {
BareJid mucJid = message.getFrom().asBareJidIfPossible();
EntityBareJid mucJid = message.getFrom().asEntityBareJidIfPossible();
if (mucJid == null) {
LOGGER.warning("Invite to non bare JID: '" + message.toXML() + "'");
return;
@ -160,7 +160,7 @@ public final class MultiUserChatManager extends Manager {
* @param jid the name of the room in the form "roomName@service", where "service" is the hostname at which the
* multi-user chat service is running. Make sure to provide a valid JID.
*/
public synchronized MultiUserChat getMultiUserChat(BareJid jid) {
public synchronized MultiUserChat getMultiUserChat(EntityBareJid jid) {
WeakReference<MultiUserChat> weakRefMultiUserChat = multiUserChats.get(jid);
if (weakRefMultiUserChat == null) {
return createNewMucAndAddToMap(jid);
@ -172,7 +172,7 @@ public final class MultiUserChatManager extends Manager {
return multiUserChat;
}
private MultiUserChat createNewMucAndAddToMap(BareJid jid) {
private MultiUserChat createNewMucAndAddToMap(EntityBareJid jid) {
MultiUserChat multiUserChat = new MultiUserChat(connection(), jid, this);
multiUserChats.put(jid, new WeakReference<MultiUserChat>(multiUserChat));
return multiUserChat;
@ -198,7 +198,7 @@ public final class MultiUserChatManager extends Manager {
*
* @return a List of the rooms where the user has joined using a given connection.
*/
public Set<BareJid> getJoinedRooms() {
public Set<EntityBareJid> getJoinedRooms() {
return Collections.unmodifiableSet(joinedRooms);
}
@ -213,15 +213,15 @@ public final class MultiUserChatManager extends Manager {
* @throws NotConnectedException
* @throws InterruptedException
*/
public List<BareJid> getJoinedRooms(JidWithLocalpart user) throws NoResponseException, XMPPErrorException,
public List<EntityBareJid> getJoinedRooms(EntityJid user) throws NoResponseException, XMPPErrorException,
NotConnectedException, InterruptedException {
// Send the disco packet to the user
DiscoverItems result = ServiceDiscoveryManager.getInstanceFor(connection()).discoverItems(user, DISCO_NODE);
List<DiscoverItems.Item> items = result.getItems();
List<BareJid> answer = new ArrayList<>(items.size());
List<EntityBareJid> answer = new ArrayList<>(items.size());
// Collect the entityID for each returned item
for (DiscoverItems.Item item : items) {
BareJid muc = item.getEntityID().asBareJidIfPossible();
EntityBareJid muc = item.getEntityID().asEntityBareJidIfPossible();
if (muc == null) {
LOGGER.warning("Not a bare JID: " + item.getEntityID());
continue;
@ -242,7 +242,7 @@ public final class MultiUserChatManager extends Manager {
* @throws NotConnectedException
* @throws InterruptedException
*/
public RoomInfo getRoomInfo(BareJid room) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
public RoomInfo getRoomInfo(EntityBareJid room) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection()).discoverInfo(room);
return new RoomInfo(info);
}
@ -313,7 +313,7 @@ public final class MultiUserChatManager extends Manager {
* @throws NotConnectedException
* @throws InterruptedException
*/
public void decline(BareJid room, String inviter, String reason) throws NotConnectedException, InterruptedException {
public void decline(EntityBareJid room, String inviter, String reason) throws NotConnectedException, InterruptedException {
Message message = new Message(room);
// Create the MUCUser packet that will include the rejection
@ -346,11 +346,11 @@ public final class MultiUserChatManager extends Manager {
invitationsListeners.remove(listener);
}
void addJoinedRoom(BareJid room) {
void addJoinedRoom(EntityBareJid room) {
joinedRooms.add(room);
}
void removeJoinedRoom(BareJid room) {
void removeJoinedRoom(EntityBareJid room) {
joinedRooms.remove(room);
}
}

View file

@ -22,7 +22,7 @@ import java.util.logging.Logger;
import org.jivesoftware.smackx.muc.packet.MUCItem;
import org.jivesoftware.smackx.muc.packet.MUCUser;
import org.jivesoftware.smack.packet.Presence;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.parts.Resourcepart;
@ -58,7 +58,7 @@ public class Occupant {
this.affiliation = item.getAffiliation();
this.role = item.getRole();
// Get the nickname from the FROM attribute of the presence
FullJid from = presence.getFrom().asFullJidIfPossible();
EntityFullJid from = presence.getFrom().asEntityFullJidIfPossible();
if (from == null) {
LOGGER.warning("Occupant presence without resource: " + presence.getFrom());
this.nick = null;

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.muc;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.parts.Resourcepart;
@ -37,7 +37,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that has just joined the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void joined(FullJid participant);
public abstract void joined(EntityFullJid participant);
/**
* Called when a room occupant has left the room on its own. This means that the occupant was
@ -46,7 +46,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that has left the room on its own.
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void left(FullJid participant);
public abstract void left(EntityFullJid participant);
/**
* Called when a room participant has been kicked from the room. This means that the kicked
@ -57,7 +57,7 @@ public interface ParticipantStatusListener {
* @param actor the moderator that kicked the occupant from the room (e.g. user@host.org).
* @param reason the reason provided by the actor to kick the occupant from the room.
*/
public abstract void kicked(FullJid participant, Jid actor, String reason);
public abstract void kicked(EntityFullJid participant, Jid actor, String reason);
/**
* Called when a moderator grants voice to a visitor. This means that the visitor
@ -66,7 +66,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted voice in the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void voiceGranted(FullJid participant);
public abstract void voiceGranted(EntityFullJid participant);
/**
* Called when a moderator revokes voice from a participant. This means that the participant
@ -76,7 +76,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked voice from the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void voiceRevoked(FullJid participant);
public abstract void voiceRevoked(EntityFullJid participant);
/**
* Called when an administrator or owner banned a participant from the room. This means that
@ -87,7 +87,7 @@ public interface ParticipantStatusListener {
* @param actor the administrator that banned the occupant (e.g. user@host.org).
* @param reason the reason provided by the administrator to ban the occupant.
*/
public abstract void banned(FullJid participant, Jid actor, String reason);
public abstract void banned(EntityFullJid participant, Jid actor, String reason);
/**
* Called when an administrator grants a user membership to the room. This means that the user
@ -96,7 +96,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted membership in the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void membershipGranted(FullJid participant);
public abstract void membershipGranted(EntityFullJid participant);
/**
* Called when an administrator revokes a user membership to the room. This means that the
@ -105,7 +105,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked membership from the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void membershipRevoked(FullJid participant);
public abstract void membershipRevoked(EntityFullJid participant);
/**
* Called when an administrator grants moderator privileges to a user. This means that the user
@ -115,7 +115,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted moderator privileges in the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void moderatorGranted(FullJid participant);
public abstract void moderatorGranted(EntityFullJid participant);
/**
* Called when an administrator revokes moderator privileges from a user. This means that the
@ -125,7 +125,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked moderator privileges in the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void moderatorRevoked(FullJid participant);
public abstract void moderatorRevoked(EntityFullJid participant);
/**
* Called when an owner grants a user ownership on the room. This means that the user
@ -135,7 +135,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted ownership on the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void ownershipGranted(FullJid participant);
public abstract void ownershipGranted(EntityFullJid participant);
/**
* Called when an owner revokes a user ownership on the room. This means that the user
@ -145,7 +145,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked ownership on the room
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void ownershipRevoked(FullJid participant);
public abstract void ownershipRevoked(EntityFullJid participant);
/**
* Called when an owner grants administrator privileges to a user. This means that the user
@ -155,7 +155,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted administrator privileges
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void adminGranted(FullJid participant);
public abstract void adminGranted(EntityFullJid participant);
/**
* Called when an owner revokes administrator privileges from a user. This means that the user
@ -165,7 +165,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked administrator privileges
* (e.g. room@conference.jabber.org/nick).
*/
public abstract void adminRevoked(FullJid participant);
public abstract void adminRevoked(EntityFullJid participant);
/**
* Called when a participant changed his/her nickname in the room. The new participant's
@ -175,6 +175,6 @@ public interface ParticipantStatusListener {
* (e.g. room@conference.jabber.org/nick).
* @param newNickname the new nickname that the participant decided to use.
*/
public abstract void nicknameChanged(FullJid participant, Resourcepart newNickname);
public abstract void nicknameChanged(EntityFullJid participant, Resourcepart newNickname);
}

View file

@ -26,7 +26,7 @@ import java.util.logging.Logger;
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
import org.jivesoftware.smackx.xdata.Form;
import org.jivesoftware.smackx.xdata.FormField;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.Jid;
/**
@ -43,7 +43,7 @@ public class RoomInfo {
/**
* JID of the room. The localpart of the JID is commonly used as the ID of the room or name.
*/
private final BareJid room;
private final EntityBareJid room;
/**
* Description of the room.
*/
@ -132,7 +132,7 @@ public class RoomInfo {
RoomInfo(DiscoverInfo info) {
final Jid from = info.getFrom();
if (from != null) {
this.room = info.getFrom().asBareJidIfPossible();
this.room = info.getFrom().asEntityBareJidIfPossible();
} else {
this.room = null;
}
@ -240,7 +240,7 @@ public class RoomInfo {
*
* @return the JID of the room whose information was discovered.
*/
public BareJid getRoom() {
public EntityBareJid getRoom() {
return room;
}

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.muc;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
/**
* A listener that is fired anytime a MUC room changes its subject.
@ -32,6 +32,6 @@ public interface SubjectUpdatedListener {
* @param subject the new room's subject.
* @param from the user that changed the room's subject (e.g. room@conference.jabber.org/nick).
*/
public abstract void subjectUpdated(String subject, FullJid from);
public abstract void subjectUpdated(String subject, EntityFullJid from);
}

View file

@ -20,7 +20,7 @@ import java.io.Serializable;
import org.jivesoftware.smack.packet.NamedElement;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
/**
* Represents a request to the server to destroy a room. The sender of the request should be the
@ -38,13 +38,13 @@ public class Destroy implements NamedElement, Serializable {
public static final String ELEMENT = "destroy";
private final String reason;
private final BareJid jid;
private final EntityBareJid jid;
public Destroy(Destroy other) {
this(other.jid, other.reason);
}
public Destroy(BareJid alternativeJid, String reason) {
public Destroy(EntityBareJid alternativeJid, String reason) {
this.jid = alternativeJid;
this.reason = reason;
}
@ -54,7 +54,7 @@ public class Destroy implements NamedElement, Serializable {
*
* @return the JID of an alternate location.
*/
public BareJid getJid() {
public EntityBareJid getJid() {
return jid;
}

View file

@ -23,7 +23,7 @@ import org.jivesoftware.smackx.muc.MUCAffiliation;
import org.jivesoftware.smackx.muc.MUCRole;
import org.jivesoftware.smackx.muc.packet.Destroy;
import org.jivesoftware.smackx.muc.packet.MUCItem;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.parts.Resourcepart;
import org.xmlpull.v1.XmlPullParser;
@ -64,7 +64,7 @@ public class MUCParserUtils {
public static Destroy parseDestroy(XmlPullParser parser) throws XmlPullParserException, IOException {
final int initialDepth = parser.getDepth();
final BareJid jid = ParserUtils.getBareJidAttribute(parser);
final EntityBareJid jid = ParserUtils.getBareJidAttribute(parser);
String reason = null;
outerloop: while (true) {
int eventType = parser.next();

View file

@ -30,7 +30,7 @@ import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.id.StanzaIdUtil;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jivesoftware.smackx.vcardtemp.packet.VCard;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.Jid;
public final class VCardManager extends Manager {
@ -125,7 +125,7 @@ public final class VCardManager extends Manager {
* @throws NotConnectedException
* @throws InterruptedException
*/
public VCard loadVCard(BareJid bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
public VCard loadVCard(EntityBareJid bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCard vcardRequest = new VCard();
vcardRequest.setTo(bareJid);
VCard result = connection().createPacketCollectorAndSend(vcardRequest).nextResultOrThrow();

View file

@ -40,7 +40,7 @@ import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.stringencoder.Base64;
import org.jivesoftware.smackx.vcardtemp.VCardManager;
import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.EntityBareJid;
/**
* A VCard class for use with the
@ -552,10 +552,10 @@ public class VCard extends IQ {
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated use {@link VCardManager#loadVCard(BareJid)} instead.
* @deprecated use {@link VCardManager#loadVCard(EntityBareJid)} instead.
*/
@Deprecated
public void load(XMPPConnection connection, BareJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
public void load(XMPPConnection connection, EntityBareJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCard result = VCardManager.getInstanceFor(connection).loadVCard(user);
copyFieldsFrom(result);
}

View file

@ -37,7 +37,7 @@ import org.jivesoftware.util.Verification;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
/**
@ -48,8 +48,8 @@ import org.jxmpp.jid.JidTestUtil;
public class InBandBytestreamManagerTest extends InitExtensions {
// settings
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
String sessionID = "session_id";

View file

@ -42,7 +42,7 @@ import org.jivesoftware.util.Verification;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.powermock.reflect.Whitebox;
@ -56,8 +56,8 @@ import org.powermock.reflect.Whitebox;
public class InBandBytestreamSessionMessageTest extends InitExtensions {
// settings
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
String sessionID = "session_id";

View file

@ -42,7 +42,7 @@ import org.jivesoftware.util.Verification;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.powermock.reflect.Whitebox;
@ -57,8 +57,8 @@ import org.powermock.reflect.Whitebox;
public class InBandBytestreamSessionTest extends InitExtensions {
// settings
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
String sessionID = "session_id";

View file

@ -29,7 +29,7 @@ import org.jivesoftware.smackx.bytestreams.BytestreamRequest;
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.jxmpp.jid.impl.JidCreate;
import org.mockito.ArgumentCaptor;
@ -42,8 +42,8 @@ import org.powermock.reflect.Whitebox;
*/
public class InitiationListenerTest extends InitExtensions {
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
String sessionID = "session_id";
XMPPConnection connection;

View file

@ -30,7 +30,7 @@ import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.jxmpp.jid.impl.JidCreate;
import org.mockito.ArgumentCaptor;
@ -43,8 +43,8 @@ import org.powermock.reflect.Whitebox;
*/
public class InitiationListenerTest {
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
String proxyAddress = "127.0.0.1";

View file

@ -51,7 +51,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.stringprep.XmppStringprepException;
@ -64,8 +64,8 @@ import org.jxmpp.stringprep.XmppStringprepException;
public class Socks5ByteStreamManagerTest {
// settings
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
String proxyAddress = "127.0.0.1";

View file

@ -41,7 +41,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.jxmpp.jid.impl.JidCreate;
@ -53,8 +53,8 @@ import org.jxmpp.jid.impl.JidCreate;
public class Socks5ByteStreamRequestTest {
// settings
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
String proxyAddress = "127.0.0.1";

View file

@ -43,7 +43,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
/**
@ -54,8 +54,8 @@ import org.jxmpp.jid.JidTestUtil;
public class Socks5ClientForInitiatorTest {
// settings
static final FullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final FullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final EntityFullJid initiatorJID = JidTestUtil.DUMMY_AT_EXAMPLE_ORG_SLASH_DUMMYRESOURCE;
static final EntityFullJid targetJID = JidTestUtil.FULL_JID_1_RESOURCE_1;
static final DomainBareJid xmppServer = JidTestUtil.DOMAIN_BARE_JID_1;
static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
String proxyAddress = "127.0.0.1";

View file

@ -33,7 +33,7 @@ import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.EntityFullJid;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@ -69,7 +69,7 @@ public class ConnectionUtils {
* @throws InterruptedException
*/
public static XMPPConnection createMockedConnection(final Protocol protocol,
FullJid initiatorJID, DomainBareJid xmppServer) throws SmackException, XMPPErrorException, InterruptedException {
EntityFullJid initiatorJID, DomainBareJid xmppServer) throws SmackException, XMPPErrorException, InterruptedException {
// mock XMPP connection
XMPPConnection connection = mock(XMPPConnection.class);

View file

@ -36,7 +36,7 @@ import org.jivesoftware.smack.packet.Stanza;
/**
* This class can be used in conjunction with a mocked XMPP connection (
* {@link ConnectionUtils#createMockedConnection(Protocol, org.jxmpp.jid.FullJid, org.jxmpp.jid.DomainBareJid)}) to
* {@link ConnectionUtils#createMockedConnection(Protocol, org.jxmpp.jid.EntityFullJid, org.jxmpp.jid.DomainBareJid)}) to
* verify an XMPP protocol. This can be accomplished in the following was:
* <ul>
* <li>add responses to packets sent over the mocked XMPP connection by the