Commit 3439aab6 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Removed unused #deliver(String).


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@330 b35dd754-fafc-0310-a699-88a17e54d16e
parent f6e27b8e
......@@ -14,7 +14,6 @@ package org.jivesoftware.messenger;
import org.jivesoftware.messenger.auth.UnauthorizedException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.io.IOException;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
......@@ -130,14 +129,4 @@ public interface Connection {
* @throws XMLStreamException if there was a problem sending the packet
*/
void deliver(XMPPPacket packet) throws UnauthorizedException, XMLStreamException;
/**
* Delivers an arbitraty text to this XMPPAddress without checking the recipient.
*
* @param text The text to deliver.
* @throws UnauthorizedException If caller doesn't have permission to access this resource
* @throws IOException if there was a i/o problem sending the text
*/
void deliver(String text) throws UnauthorizedException, IOException;
}
......@@ -194,20 +194,4 @@ public class SocketConnection extends BasicConnection {
session.incrementServerPacketCount();
}
}
public void deliver(String text) throws UnauthorizedException, IOException {
if (isClosed()) {
// TODO Do we want to store offline this text?
//deliverer.deliver(packet);
}
else {
synchronized (writer) {
writer.write(text);
writer.flush();
}
// TODO Do we need to audit and count these packets?
//auditor.audit(packet);
//session.incrementServerPacketCount();
}
}
}
......@@ -17,7 +17,6 @@ import org.jivesoftware.messenger.auth.Permissions;
import org.jivesoftware.messenger.auth.UnauthorizedException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.io.IOException;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
......@@ -130,17 +129,4 @@ public class ConnectionProxy implements Connection {
throw new UnauthorizedException();
}
}
public void deliver(String text) throws UnauthorizedException, IOException {
//if (permissions.hasPermission(Permissions.SYSTEM_ADMIN
// | Permissions.USER_ADMIN)) {
// Look into doing something about limiting delivery
// of packets until properly authenticated
if (true) {
conn.deliver(text);
}
else {
throw new UnauthorizedException();
}
}
}
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