Commit 155bb672 authored by Guus der Kinderen's avatar Guus der Kinderen

Adding work-around for plugins that introduce non-standard connection types (smack, websocket).

parent 5b21ed98
package org.ifsoft.websockets;
import org.jivesoftware.openfire.spi.ConnectionConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -84,6 +85,16 @@ public class WSConnection extends VirtualConnection
this.socket.deliver(text);
}
@Override
public ConnectionConfiguration getConfiguration()
{
// TODO Here we run into an issue with the ConnectionConfiguration introduced in Openfire 4:
// it is not extensible in the sense that unforeseen connection types can be added.
// For now, null is returned, as this object is likely to be unused (its lifecycle is
// not managed by a ConnectionListener instance).
return null;
}
public Certificate[] getPeerCertificates() {
return null;
}
......
......@@ -20,6 +20,8 @@
package org.jivesoftware.smack;
import org.jivesoftware.openfire.spi.ConnectionManagerImpl;
import org.jivesoftware.openfire.spi.ConnectionType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -789,7 +791,17 @@ public class XMPPConnection extends Connection
}
}
public Certificate[] getPeerCertificates() {
@Override
public org.jivesoftware.openfire.spi.ConnectionConfiguration getConfiguration()
{
// TODO Here we run into an issue with the ConnectionConfiguration introduced in Openfire 4:
// it is not extensible in the sense that unforeseen connection types can be added.
// For now, null is returned, as this object is likely to be unused (its lifecycle is
// not managed by a ConnectionListener instance).
return null;
}
public Certificate[] getPeerCertificates() {
return null;
}
......
......@@ -19,9 +19,13 @@ import java.net.InetSocketAddress;
import org.dom4j.Namespace;
import org.jivesoftware.openfire.PacketDeliverer;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.auth.UnauthorizedException;
import org.jivesoftware.openfire.net.VirtualConnection;
import org.jivesoftware.openfire.nio.OfflinePacketDeliverer;
import org.jivesoftware.openfire.spi.ConnectionConfiguration;
import org.jivesoftware.openfire.spi.ConnectionManagerImpl;
import org.jivesoftware.openfire.spi.ConnectionType;
import org.xmpp.packet.Packet;
import org.xmpp.packet.StreamError;
......@@ -106,7 +110,17 @@ public class WebSocketConnection extends VirtualConnection
return backupDeliverer;
}
@Override
@Override
public ConnectionConfiguration getConfiguration()
{
// TODO Here we run into an issue with the ConnectionConfiguration introduced in Openfire 4:
// it is not extensible in the sense that unforeseen connection types can be added.
// For now, null is returned, as this object is likely to be unused (its lifecycle is
// not managed by a ConnectionListener instance).
return null;
}
@Override
public boolean isCompressed() {
return XmppWebSocket.isCompressionEnabled();
}
......
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