Commit 6170f35e authored by Matt Tucker's avatar Matt Tucker Committed by matt

Code cleanup.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4355 b35dd754-fafc-0310-a699-88a17e54d16e
parent 45ac9d20
package org.jivesoftware.wildfire.gateway;
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
/**
* AbstractGatewaySession provides an abstract implementation of
......@@ -8,7 +17,6 @@ package org.jivesoftware.wildfire.gateway;
* management.
*
* @author Noah Campbell
* @version 1.0
*/
public abstract class AbstractGatewaySession implements GatewaySession, Endpoint {
......
package org.jivesoftware.wildfire.gateway;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import java.util.*;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.collections.BidiMap;
import org.apache.commons.collections.bidimap.DualHashBidiMap;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
import org.jivesoftware.wildfire.gateway.roster.AbstractForeignContact;
import org.jivesoftware.wildfire.gateway.roster.ForeignContact;
import org.jivesoftware.wildfire.gateway.roster.NormalizedJID;
import org.jivesoftware.wildfire.gateway.roster.PersistenceManager;
import org.jivesoftware.wildfire.gateway.roster.Roster;
import org.jivesoftware.wildfire.gateway.roster.Status;
import org.jivesoftware.wildfire.gateway.util.BackgroundThreadFactory;
import org.jivesoftware.util.LocaleUtils;
import org.xmpp.component.Component;
import org.xmpp.component.ComponentException;
import org.xmpp.component.ComponentManager;
......@@ -35,7 +29,6 @@ import org.xmpp.packet.Message;
import org.xmpp.packet.Packet;
import org.xmpp.packet.Presence;
import org.xmpp.packet.PacketError.Condition;
import org.xmpp.packet.Presence.Show;
/**
* Handle a good share of the tasks for a gateway. Dealing with lookups for ids,
......@@ -52,7 +45,7 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
public abstract String getName();
/**
* @see org.jivesoftware.wildfire.gateway.Gateway#setName()
* @see org.jivesoftware.wildfire.gateway.Gateway#setName(String)
*/
public abstract void setName(String newname);
......@@ -113,7 +106,7 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
/**
* Handle Foreign Contacts and JID Mapping
*/
private final BidiMap foreignContacts = new DualHashBidiMap();
private final Map<JID, String> foreignContacts = new HashMap<JID, String>();
/**
* helper method for getting the ns from a packet.
......@@ -463,13 +456,12 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
* @see org.xmpp.packet.Message
*/
private void processPacket(Message message) throws Exception {
logger.finer(message.toString());
GatewaySession session = PersistenceManager.Factory.get(this).getRegistrar().getGatewaySession(message.getFrom());
session.getLegacyEndpoint().sendPacket(message);
return;
}
/**
* Proces a presense packet.
*
......@@ -492,9 +484,8 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
if(!Presence.Type.unavailable.equals(presence.getType())) {
logger.log(Level.INFO, "basegateway.unauthorizedrequest", new Object[] { presence.getType(), from.toString() });
Presence result = new Presence();
result = new Presence();
result.setError(Condition.not_authorized);
result.setStatus(bundle.getString("basegateway.registerfirst"));
result.setStatus(LocaleUtils.getLocalizedString("basegateway.registerfirst", "gateway"));
p.add(result);
}
return p;
......@@ -508,7 +499,8 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
logger.log(Level.WARNING, "basegateway.unabletolocatesession" , from);
return p;
}
if(Presence.Type.subscribe.equals(presence.getType())) {
if(Presence.Type.subscribe.equals(presence.getType())) {
if(presence.getTo().equals(this.jid)) {
sessionInfo.getSubscriptionInfo().serverRegistered = true;
} else {
......@@ -522,14 +514,16 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
reply.setFrom(presence.getTo());
p.add(reply);
} else if (Presence.Type.subscribed.equals(presence.getType())) {
}
else if (Presence.Type.subscribed.equals(presence.getType())) {
if(presence.getTo().equals(this.jid)) { // subscribed to server
sessionInfo.getSubscriptionInfo().clientRegistered = true;
} else { // subscribe to legacy user
logger.log(Level.FINE,"basegateway.subscribed");
}
} else if (Presence.Type.unavailable.equals(presence.getType())){
}
else if (Presence.Type.unavailable.equals(presence.getType())){
/**
* If an unavailable presence stanza is received then logout the
* current user and send back and unavailable stanza.
......@@ -542,17 +536,15 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
reply.setTo(presence.getFrom());
reply.setFrom(presence.getTo());
p.add(reply);
} else if (presence.getTo().getNode() == null) { // this is a request to the gateway only.
}
else if (presence.getTo().getNode() == null) { // this is a request to the gateway only.
Presence result = new Presence();
result.setTo(presence.getFrom());
result.setFrom(this.jid);
p.add(result);
logger.log(Level.FINE, "basegateway.gatewaypresence");
} else {
}
else {
GatewaySession session = rosterManager.getRegistrar().getGatewaySession(presence.getFrom());
try {
......@@ -563,27 +555,20 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
p2.setTo(presence.getFrom());
if(status.isOnline()) {
p2.setStatus(status.getValue());
} else {
}
else {
p2.setType(Presence.Type.unavailable);
}
p.add(p2);
} catch (Exception e) {
}
catch (Exception e) {
logger.log(Level.WARNING, "basegateway.statusexception",
new Object[]{presence.getTo(), presence.getFrom(), e.getLocalizedMessage()});
}
}
return p;
}
/** The resource bundle for this gateway. */
ResourceBundle bundle = PropertyResourceBundle.getBundle("gateway_i18n");
/** The jabberEndpointValve. */
private EndpointValve jabberEndpointValve;
/**
* Return the JID of this component.
*
......@@ -605,7 +590,7 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
*/
public void initialize(JID jid, ComponentManager componentManager) throws ComponentException {
this.jid = jid;
this.jabberEndpointValve = new EndpointValve(false);
EndpointValve jabberEndpointValve = new EndpointValve(false);
this.jabberEndpoint = new JabberEndpoint(componentManager, this, jabberEndpointValve);
}
......@@ -617,8 +602,8 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
* @return jid The JID associated with this contact.
*/
public JID whois(String foreignContact) {
JID jid = new JID(foreignContact + "@" + this.getName() + "." + this.getDomain());
foreignContacts.put(foreignContact, jid);
JID jid = new JID(foreignContact, this.getName() + "." + this.getDomain(), null);
foreignContacts.put(jid, foreignContact);
return jid;
}
......@@ -629,7 +614,7 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
* @return contact A String for the foreign contact or null if non is regestered.
*/
public String whois(JID jid) {
return (String)foreignContacts.get(jid);
return foreignContacts.get(jid);
}
/**
......@@ -643,6 +628,7 @@ public abstract class BaseGateway implements Gateway, Component, Runnable {
* Shutdown this component
*/
public void shutdown() {
threadPool.shutdown();
}
/**
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
import org.xmpp.component.ComponentException;
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author Noah Campbell
* @version 1.0
*/
public class EndpointValve {
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
import org.xmpp.packet.JID;
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
import java.util.List;
......@@ -10,7 +20,6 @@ import org.xmpp.packet.JID;
* GatewaySession provides an interface that legacy gateways need to implement.
*
* @author Noah Campbell
* @version 1.0
*/
public interface GatewaySession {
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
import java.util.concurrent.ConcurrentLinkedQueue;
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
/**
......@@ -15,4 +25,4 @@ public interface SessionFactory {
* @return gatewaySession The gateway session.
*/
public GatewaySession newInstance(SubscriptionInfo info);
}
}
\ No newline at end of file
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
import java.io.Serializable;
......@@ -11,7 +21,6 @@ import org.xmpp.packet.JID;
* information repeatedly.
*
* @author Noah Campbell
* @version 1.0
*/
public class SubscriptionInfo implements Serializable {
......@@ -52,4 +61,4 @@ public class SubscriptionInfo implements Serializable {
*/
public transient JID jid;
}
}
\ No newline at end of file
......@@ -15,13 +15,11 @@ package org.jivesoftware.wildfire.gateway.protocols.oscar;
import org.jivesoftware.util.Log;
import net.kano.joscar.*;
import net.kano.joscar.tlv.*;
import net.kano.joscar.flap.*;
import net.kano.joscar.flapcmd.*;
import net.kano.joscar.net.*;
import net.kano.joscar.snac.*;
import net.kano.joscar.snaccmd.auth.*;
import net.kano.joscar.snaccmd.chat.*;
import java.net.InetAddress;
......
......@@ -21,7 +21,6 @@ import net.kano.joscar.ssiitem.*;
/**
* @author Daniel Henninger
* @version 1.0
*/
public class OSCARForeignContact extends AbstractForeignContact {
......
......@@ -10,7 +10,6 @@
package org.jivesoftware.wildfire.gateway.protocols.oscar;
import java.util.logging.Logger;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.gateway.BaseGateway;
......@@ -23,7 +22,6 @@ import org.xmpp.packet.Packet;
/**
* @author Daniel Henninger
* @version 1.0
*/
public class OSCARGateway extends BaseGateway {
/* Gateway Name String */
......
package org.jivesoftware.wildfire.gateway.protocols.oscar;
import java.io.IOException;
import java.net.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.HashSet;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.gateway.AbstractGatewaySession;
import org.jivesoftware.wildfire.gateway.Endpoint;
import org.jivesoftware.wildfire.gateway.EndpointValve;
import org.jivesoftware.wildfire.gateway.Gateway;
import org.jivesoftware.wildfire.gateway.JabberEndpoint;
import org.jivesoftware.wildfire.gateway.SubscriptionInfo;
import org.jivesoftware.wildfire.gateway.roster.AbstractForeignContact;
import org.jivesoftware.wildfire.gateway.roster.ForeignContact;
import org.jivesoftware.wildfire.gateway.roster.NormalizedJID;
import org.jivesoftware.wildfire.gateway.roster.PersistenceManager;
import org.jivesoftware.wildfire.gateway.roster.UnknownForeignContactException;
import org.xmpp.packet.JID;
import org.xmpp.packet.Message;
import org.xmpp.packet.Packet;
import org.xmpp.packet.Presence;
import net.kano.joscar.flap.*;
import net.kano.joscar.flapcmd.*;
import net.kano.joscar.snac.*;
import net.kano.joscar.snaccmd.*;
import net.kano.joscar.snaccmd.auth.*;
import net.kano.joscar.snaccmd.conn.*;
import net.kano.joscar.snaccmd.icbm.*;
import net.kano.joscar.snaccmd.ssi.*;
......@@ -44,7 +28,6 @@ import net.kano.joscar.ByteBlock;
* Manages the session to the underlying legacy system.
*
* @author Daniel Henninger
* @version 1.0
*/
public class OSCARGatewaySession extends AbstractGatewaySession implements Endpoint {
......@@ -147,7 +130,7 @@ public class OSCARGatewaySession extends AbstractGatewaySession implements Endpo
public String getStatus(JID to) {
Log.debug("getStatus called");
for (ForeignContact c : contacts) {
if (c.getName() == to.getNode()) {
if (c.getName().equals(to.getNode())) {
return c.getStatus().getValue();
}
}
......@@ -159,7 +142,7 @@ public class OSCARGatewaySession extends AbstractGatewaySession implements Endpo
Integer newBuddyId = highestBuddyId + 1;
Integer groupId = -1;
for (GroupItem g : groups) {
if (g.getGroupName() == "Transport Buddies") {
if ("Transport Buddies".equals(g.getGroupName())) {
groupId = g.getId();
}
}
......@@ -177,7 +160,7 @@ public class OSCARGatewaySession extends AbstractGatewaySession implements Endpo
public void removeContact(JID jid) throws Exception {
Log.debug("removeContact called");
for (ForeignContact c : contacts) {
if (c.getName() == jid.getNode()) {
if (c.getName().equals(jid.getNode())) {
OSCARForeignContact oc = (OSCARForeignContact)c;
request(new DeleteItemsCmd(new SsiItem[] { oc.getSSIItem() }));
contacts.remove(contacts.indexOf(c));
......@@ -196,7 +179,7 @@ public class OSCARGatewaySession extends AbstractGatewaySession implements Endpo
public ForeignContact getContact(JID to) throws UnknownForeignContactException {
Log.debug("getContact called");
for (ForeignContact c : contacts) {
if (c.getName() == to.getNode()) {
if (c.getName().equals(to.getNode())) {
return c;
}
}
......
......@@ -12,8 +12,6 @@
package org.jivesoftware.wildfire.gateway.protocols.oscar;
import org.jivesoftware.util.Log;
import net.kano.joscar.snac.SnacRequest;
import java.util.ArrayList;
......@@ -22,34 +20,32 @@ import java.util.List;
import java.util.Map;
public class PendingSnacMgr {
protected Map snacs = new HashMap();
public boolean isPending(int familyCode) {
Integer family = new Integer(familyCode);
protected Map<Integer,List<SnacRequest>> snacs = new HashMap<Integer,List<SnacRequest>>();
return snacs.containsKey(family);
public boolean isPending(int familyCode) {
return snacs.containsKey(familyCode);
}
public void add(SnacRequest request) {
Integer family = new Integer(request.getCommand().getFamily());
Integer family = request.getCommand().getFamily();
List pending = (List) snacs.get(family);
List<SnacRequest> pending = snacs.get(family);
pending.add(request);
}
public SnacRequest[] getPending(int familyCode) {
Integer family = new Integer(familyCode);
List pending = (List) snacs.get(family);
return (SnacRequest[]) pending.toArray(new SnacRequest[0]);
List<SnacRequest> pending = snacs.get(familyCode);
return pending.toArray(new SnacRequest[0]);
}
public void setPending(int familyCode, boolean pending) {
Integer family = new Integer(familyCode);
if (pending) snacs.put(family, new ArrayList());
else snacs.remove(family);
if (pending) {
snacs.put(familyCode, new ArrayList<SnacRequest>());
}
else {
snacs.remove(familyCode);
}
}
}
......@@ -34,6 +34,7 @@ import java.util.List;
import java.util.Map;
public class ServiceConnection extends BasicFlapConnection {
protected int serviceFamily;
public ServiceConnection(OSCARGatewaySession mainSession, ByteBlock cookie, int serviceFamily) {
......@@ -98,13 +99,12 @@ public class ServiceConnection extends BasicFlapConnection {
for (int i = 0; i < infos.length; i++) {
if (infos[i].getType() == InterestInfo.TYPE_CHILD) {
int parentCode = infos[i].getParentId();
Integer parent = new Integer(parentCode);
List interests = (List) children.get(parent);
List interests = (List) children.get(parentCode);
if (interests == null) {
interests = new LinkedList();
children.put(parent, interests);
children.put(parentCode, interests);
}
interests.add(infos[i]);
......
......@@ -12,8 +12,6 @@
package org.jivesoftware.wildfire.gateway.protocols.oscar;
import org.jivesoftware.util.Log;
import net.kano.joscar.snac.SnacRequest;
import java.util.ArrayList;
......@@ -42,13 +40,12 @@ public class SnacManager {
for (int i = 0; i < families.length; i++) {
int familyCode = families[i];
Integer family = new Integer(familyCode);
List handlers = (List) conns.get(family);
List handlers = (List) conns.get(familyCode);
if (handlers == null) {
handlers = new LinkedList();
conns.put(family, handlers);
conns.put(familyCode, handlers);
}
if (!handlers.contains(conn)) handlers.add(conn);
......@@ -89,11 +86,11 @@ public class SnacManager {
}
public BasicFlapConnection getConn(int familyCode) {
Integer family = new Integer(familyCode);
List handlers = (List) conns.get(family);
List handlers = (List) conns.get(familyCode);
if (handlers == null || handlers.size() == 0) return null;
if (handlers == null || handlers.size() == 0) {
return null;
}
return (BasicFlapConnection) handlers.get(0);
}
......@@ -108,7 +105,9 @@ public class SnacManager {
}
public void addListener(PendingSnacListener l) {
if (!listeners.contains(l)) listeners.add(l);
if (!listeners.contains(l)) {
listeners.add(l);
}
}
public void removeListener(PendingSnacListener l) {
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.yahoo;
import java.util.logging.Logger;
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.yahoo;
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.yahoo;
import java.util.logging.Logger;
......@@ -29,7 +39,7 @@ public class YahooGateway extends BaseGateway {
}
/**
* @see org.jivesoftware.wildfire.gateway.BaseGateway#setName()
* @see org.jivesoftware.wildfire.gateway.BaseGateway#setName(String)
*/
@Override
public void setName(String newname) {
......
package org.jivesoftware.wildfire.gateway.protocols.yahoo;
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.yahoo;
import java.io.IOException;
import java.util.ArrayList;
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.yahoo;
import java.util.logging.Level;
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
package org.jivesoftware.wildfire.gateway.roster;
import java.io.IOException;
import java.io.Serializable;
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.io.Serializable;
......@@ -13,11 +23,8 @@ import org.xmpp.packet.JID;
* Manage contacts for a paticular JID.
*
* @author Noah Campbell
*
*/
public class ContactManager implements Serializable {
/**
* Construct a new <code>ContactManager</code>
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import org.jivesoftware.wildfire.gateway.GatewaySession;
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.io.Serializable;
......
package org.jivesoftware.wildfire.gateway.roster;
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.io.File;
import java.io.FileInputStream;
......
package org.jivesoftware.wildfire.gateway.roster;
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.io.IOException;
import java.io.ObjectInputStream;
......
package org.jivesoftware.wildfire.gateway.roster;
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.io.Serializable;
import java.util.Collection;
......@@ -22,7 +31,6 @@ import org.jivesoftware.wildfire.gateway.Gateway;
*/
public class Roster implements Serializable {
/**
* The serialVersionUID.
*/
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.io.Serializable;
/**
* @author Noah Campbell
* @version 1.0
*/
/**
* Status object.
*
* @author Noah Campbell
* @version 1.0
*/
public final class Status implements Serializable {
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.roster;
import java.text.MessageFormat;
......@@ -9,20 +16,14 @@ import java.util.ResourceBundle;
/**
* @author Noah Campbell
* @version 1.0
*/
public class UnknownForeignContactException extends Exception {
/** The args. */
private final Object[] args;
/** The serialVersionUID. */
private static final long serialVersionUID = 1L;
/**
* Construct a new <code>UnknownForeignContactException</code>.
*
* Constructs a new <code>UnknownForeignContactException</code>.
*/
public UnknownForeignContactException() {
super();
......@@ -61,19 +62,4 @@ public class UnknownForeignContactException extends Exception {
super(cause);
args = new Object[0];
}
/**
* @see java.lang.Throwable#getLocalizedMessage()
*/
@Override
public String getLocalizedMessage() {
return MessageFormat.format(resource.getString(this.getMessage()), args);
}
/** The resource. */
private static ResourceBundle resource = PropertyResourceBundle.getBundle("exceptions");
}
}
\ No newline at end of file
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.util;
import java.util.concurrent.ThreadFactory;
......@@ -9,7 +16,6 @@ import java.util.concurrent.ThreadFactory;
* Generates threads that are of low priority and daemon.
*
* @author Noah Campbell
* @version 1.0
*/
public class BackgroundThreadFactory implements ThreadFactory {
......
/**
*
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.util;
import java.util.logging.Level;
......@@ -9,7 +16,6 @@ import java.util.logging.Level;
* Custom log levels.
*
* @author Noah Campbell
* @version 1.0
* @see java.util.logging.Level
*/
public class GatewayLevel extends Level {
......@@ -31,5 +37,4 @@ public class GatewayLevel extends Level {
/** The serialVersionUID. */
private static final long serialVersionUID = 1L;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment