/** * Creates a "from" filter using the "from" field part. If the specified address is a bare JID * then the filter will match any address whose bare JID matches the specified JID. But if the * specified address is a full JID then the filter will only match if the sender of the packet * matches the specified resource. * * @param address the from field value the packet must match. Could be a full or bare JID. */ public FromMatchesFilter(String address) { if (address == null) { throw new IllegalArgumentException("Parameter cannot be null."); } this.address = address.toLowerCase(); matchBareJID = "".equals(StringUtils.parseResource(address)); }
/** * Creates a "from" filter using the "from" field part. If the specified address is a bare JID * then the filter will match any address whose bare JID matches the specified JID. But if the * specified address is a full JID then the filter will only match if the sender of the packet * matches the specified resource. * * @param address the from field value the packet must match. Could be a full or bare JID. */ public FromMatchesFilter(String address) { if (address == null) { throw new IllegalArgumentException("Parameter cannot be null."); } this.address = address.toLowerCase(); matchBareJID = "".equals(StringUtils.parseResource(address)); }
/** * Creates a "from" filter using the "from" field part. If the specified address is a bare JID * then the filter will match any address whose bare JID matches the specified JID. But if the * specified address is a full JID then the filter will only match if the sender of the packet * matches the specified resource. * * @param address the from field value the packet must match. Could be a full or bare JID. */ public FromMatchesFilter(String address) { if (address == null) { throw new IllegalArgumentException("Parameter cannot be null."); } this.address = address.toLowerCase(); matchBareJID = "".equals(StringUtils.parseResource(address)); }
/** * Creates a "from" filter using the "from" field part. If the specified address is a bare JID * then the filter will match any address whose bare JID matches the specified JID. But if the * specified address is a full JID then the filter will only match if the sender of the packet * matches the specified resource. * * @param address the from field value the packet must match. Could be a full or bare JID. */ public FromMatchesFilter(String address) { if (address == null) { throw new IllegalArgumentException("Parameter cannot be null."); } this.address = address.toLowerCase(); matchBareJID = "".equals(StringUtils.parseResource(address)); }
private void refreshOnlineStatus() throws MissingResourceException { if (muc!=null) { online.setText(muc.getOccupantsCount()+""); //NOI18N Iterator<String> string = muc.getOccupants(); StringBuffer buffer = new StringBuffer(); buffer.append("<html><body>"); // NOI18N while (string.hasNext()) { buffer.append(StringUtils.parseResource(string.next()) + "<br>"); // NOI18N } buffer.append("</body></html>"); // NOI18N online.setToolTipText(buffer.toString()); } }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "Smack Debug Window -- " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); frame.setTitle(title); }
public void run() { statusLine.setForeground(Color.black); statusLine.setText("<html><b>" + StringUtils.parseResource(presence.getFrom()) + "</b> is now " + presence.getType() + "</html>"); //NOI18N //fadein.start(); new Fader(statusLine).start(); } });
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "Smack Debug Window -- " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); frame.setTitle(title); }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "Smack Debug Window -- " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); frame.setTitle(title); }
public Collection<FakeRosterEntry> getEntries() { TreeSet<FakeRosterEntry> entries = new TreeSet(); Iterator<String> i = muc.getOccupants(); while (i.hasNext()) { String name = i.next(); if (!StringUtils.parseResource(name).equals(KenaiConnection.getKenaiProject(muc).getKenai().getPasswordAuthentication().getUserName())) { entries.add(new FakeRosterEntry(muc.getOccupant(name))); } } return entries; }
/** * Creates an Jingle session to start a communication with another user. * * @param responder the fully qualified jabber ID with resource of the other * user. * @return The session on which the negotiation can be run. */ public JingleSession createOutgoingJingleSession(String responder) throws XMPPException { if (responder == null || StringUtils.parseName(responder).length() <= 0 || StringUtils.parseServer(responder).length() <= 0 || StringUtils.parseResource(responder).length() <= 0) { throw new IllegalArgumentException("The provided user id was not fully qualified"); } JingleSession session = new JingleSession(connection, (JingleSessionRequest) null, connection.getUser(), responder, jingleMediaManagers); triggerSessionCreated(session); return session; }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "User logged (" + connection.hashCode() + "): " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); Log.d("SMACK", title); // Add the connection listener to the connection so that the debugger can be notified // whenever the connection is closed. connection.addConnectionListener(connListener); }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "User logged (" + connection.hashCode() + "): " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); System.out.println(title); // Add the connection listener to the connection so that the debugger can be notified // whenever the connection is closed. connection.addConnectionListener(connListener); }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "User logged (" + connection.hashCode() + "): " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); System.out.println(title); // Add the connection listener to the connection so that the debugger can be notified // whenever the connection is closed. connection.addConnectionListener(connListener); }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "User logged (" + connection.hashCode() + "): " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); System.out.println(title); // Add the connection listener to the connection so that the debugger can be notified // whenever the connection is closed. connection.addConnectionListener(connListener); }
public void userHasLogged(String user) { boolean isAnonymous = "".equals(StringUtils.parseName(user)); String title = "User logged (" + connection.hashCode() + "): " + (isAnonymous ? "" : StringUtils.parseBareAddress(user)) + "@" + connection.getServiceName() + ":" + connection.getPort(); title += "/" + StringUtils.parseResource(user); System.out.println(title); // Add the connection listener to the connection so that the debugger can be notified // whenever the connection is closed. connection.addConnectionListener(connListener); }
Occupant(Presence presence) { super(); MUCUser mucUser = (MUCUser) presence.getExtension("x", "http://jabber.org/protocol/muc#user"); MUCUser.Item item = mucUser.getItem(); this.jid = item.getJid(); this.affiliation = item.getAffiliation(); this.role = item.getRole(); // Get the nickname from the FROM attribute of the presence this.nick = StringUtils.parseResource(presence.getFrom()); }
Occupant(Presence presence) { super(); MUCUser mucUser = (MUCUser) presence.getExtension("x", "http://jabber.org/protocol/muc#user"); MUCUser.Item item = mucUser.getItem(); this.jid = item.getJid(); this.affiliation = item.getAffiliation(); this.role = item.getRole(); // Get the nickname from the FROM attribute of the presence this.nick = StringUtils.parseResource(presence.getFrom()); }
Occupant(Presence presence) { super(); MUCUser mucUser = (MUCUser) presence.getExtension("x", "http://jabber.org/protocol/muc#user"); MUCUser.Item item = mucUser.getItem(); this.jid = item.getJid(); this.affiliation = item.getAffiliation(); this.role = item.getRole(); // Get the nickname from the FROM attribute of the presence this.nick = StringUtils.parseResource(presence.getFrom()); }
Occupant(Presence presence) { super(); MUCUser mucUser = (MUCUser) presence.getExtension("x", "http://jabber.org/protocol/muc#user"); MUCUser.Item item = mucUser.getItem(); this.jid = item.getJid(); this.affiliation = item.getAffiliation(); this.role = item.getRole(); // Get the nickname from the FROM attribute of the presence this.nick = StringUtils.parseResource(presence.getFrom()); }