You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by sj...@apache.org on 2008/08/04 20:16:04 UTC
svn commit: r682451 -
/mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/AsyncHttpClient.java
Author: sjlee
Date: Mon Aug 4 11:16:04 2008
New Revision: 682451
URL: http://svn.apache.org/viewvc?rev=682451&view=rev
Log:
ASYNCWEB-21
Use heap buffers and a SimpleByteBufferAllocator by default.
Modified:
mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/AsyncHttpClient.java
Modified: mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/AsyncHttpClient.java
URL: http://svn.apache.org/viewvc/mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/AsyncHttpClient.java?rev=682451&r1=682450&r2=682451&view=diff
==============================================================================
--- mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/AsyncHttpClient.java (original)
+++ mina/asyncweb/branches/1.0/client/src/main/java/org/apache/asyncweb/client/AsyncHttpClient.java Mon Aug 4 11:16:04 2008
@@ -44,11 +44,13 @@
import org.apache.asyncweb.client.util.EventDispatcher;
import org.apache.asyncweb.client.util.MonitoringEvent;
import org.apache.asyncweb.client.util.MonitoringListener;
+import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.ConnectFuture;
import org.apache.mina.common.IoFuture;
import org.apache.mina.common.IoFutureListener;
import org.apache.mina.common.IoSession;
import org.apache.mina.common.RuntimeIOException;
+import org.apache.mina.common.SimpleByteBufferAllocator;
import org.apache.mina.common.ThreadModel;
import org.apache.mina.common.support.DefaultConnectFuture;
import org.apache.mina.filter.SSLFilter;
@@ -160,6 +162,12 @@
public static final String PROTOCOL_FILTER = "protocolFilter";
public static final String PROXY_FILTER = "proxyFilter";
public static final String EVENT_THREAD_POOL_FILTER = "eventThreadPoolFilter";
+
+ static {
+ // use heap buffers with a simple byte buffer allocator
+ ByteBuffer.setUseDirectBuffers(false);
+ ByteBuffer.setAllocator(new SimpleByteBufferAllocator());
+ }
/**
* Checks if is reuse address.