Commit ff30b90b authored by Tom Evans's avatar Tom Evans

OF-421: More cleanup for MINA API changes

Update version number and dependency change for OF 3.10.0 (due to MINA
2.0.x API change)
parent f4bbdc61
......@@ -92,7 +92,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
private static final int MB = 1024 * 1024;
public static final String EXECUTOR_FILTER_NAME = "threadPool";
public static final String EXECUTOR_FILTER_NAME = "threadModel";
public static final String TLS_FILTER_NAME = "tls";
public static final String COMPRESSION_FILTER_NAME = "compression";
public static final String XMPP_CODEC_FILTER_NAME = "xmpp";
......@@ -362,13 +362,13 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
ThreadFactory threadFactory = eventExecutor.getThreadFactory();
threadFactory = new DelegatingThreadFactory("Old executor thread - ", threadFactory);
eventExecutor.setThreadFactory(threadFactory);
eventExecutor.setCorePoolSize(eventThreads + 1);
eventExecutor.setMaximumPoolSize(eventThreads + 1);
eventExecutor.setCorePoolSize(eventThreads + 1);
eventExecutor.setKeepAliveTime(60, TimeUnit.SECONDS);
// Add the XMPP codec filter
socketAcceptor.getFilterChain().addFirst(XMPP_CODEC_FILTER_NAME, new ProtocolCodecFilter(new XMPPCodecFactory()));
socketAcceptor.getFilterChain().addFirst(EXECUTOR_FILTER_NAME, executorFilter);
socketAcceptor.getFilterChain().addAfter(EXECUTOR_FILTER_NAME, XMPP_CODEC_FILTER_NAME, new ProtocolCodecFilter(new XMPPCodecFactory()));
// Kill sessions whose outgoing queues keep growing and fail to send traffic
socketAcceptor.getFilterChain().addAfter(XMPP_CODEC_FILTER_NAME, CAPACITY_FILTER_NAME, new StalledSessionsFilter());
// Throttle sessions who send data too fast
......
......@@ -43,6 +43,11 @@
<h1>
XML Debugger Plugin Changelog
</h1>
<p><b>1.4.0</b> -- Oct 20, 2014</p>
<ul>
<li>Updated for MINA 2.0.x API changes. Requires Openfire 3.10.0.</li>
</ul>
<p><b>1.3.0</b> -- Sep 13, 2013</p>
<ul>
<li>Requires Openfire 3.9.0.</li>
......
......@@ -8,9 +8,9 @@
<name>Debugger Plugin</name>
<description>Prints XML traffic to the stdout (raw and interpreted XML)</description>
<author>Jive Software</author>
<version>1.3.0</version>
<date>09/13/2013</date>
<minServerVersion>3.9.0</minServerVersion>
<version>1.4.0</version>
<date>10/20/2014</date>
<minServerVersion>3.10.0</minServerVersion>
<adminconsole>
<tab id="tab-server">
......
......@@ -68,14 +68,14 @@ public class RawPrintFilter extends IoFilterAdapter {
}
@Override
public void messageSent(NextFilter nextFilter, IoSession session, WriteRequest message) throws Exception {
if (enabled) {
public void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception {
if (enabled && writeRequest.getMessage() instanceof ByteBuffer) {
System.out.println(prefix + " - SENT (" + session.hashCode() + "): " +
Charset.forName("UTF-8").decode(((ByteBuffer) message).asReadOnlyBuffer()));
Charset.forName("UTF-8").decode(((ByteBuffer) writeRequest.getMessage()).asReadOnlyBuffer()));
}
// Pass the message to the next filter
super.messageSent(nextFilter, session, message);
super.messageSent(nextFilter, session, writeRequest);
}
public boolean isEnabled() {
......
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