diff --git a/src/main/java/org/jboss/netty/channel/ChannelConfig.java b/src/main/java/org/jboss/netty/channel/ChannelConfig.java
index 39a8cf6909..d17ae23117 100644
--- a/src/main/java/org/jboss/netty/channel/ChannelConfig.java
+++ b/src/main/java/org/jboss/netty/channel/ChannelConfig.java
@@ -28,6 +28,7 @@ import java.util.Map;
import org.jboss.netty.buffer.ChannelBufferFactory;
import org.jboss.netty.channel.socket.SocketChannelConfig;
import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
+import org.jboss.netty.handler.timeout.WriteTimeoutHandler;
/**
* A set of configuration properties of a {@link Channel}.
@@ -55,8 +56,6 @@ import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
*
* {@code "connectTimeoutMillis"} | {@link #setConnectTimeoutMillis(int)} |
*
- * {@code "writeTimeoutMillis"} | {@link #setWriteTimeoutMillis(int)} |
- *
* {@code "pipelineFactory"} | {@link #setPipelineFactory(ChannelPipelineFactory)} |
*
*
@@ -119,6 +118,8 @@ public interface ChannelConfig {
void setConnectTimeoutMillis(int connectTimeoutMillis);
/**
+ * @deprecated Use {@link WriteTimeoutHandler} instead if necessary.
+ *
* Returns the write timeout of the channel in milliseconds. If a write
* operation is not completed within the write timeout, an
* {@link IOException} will be raised. If the {@link Channel} does not
@@ -127,9 +128,12 @@ public interface ChannelConfig {
*
* @return the write timeout in milliseconds. {@code 0} if disabled.
*/
+ @Deprecated
int getWriteTimeoutMillis();
/**
+ * @deprecated Use {@link WriteTimeoutHandler} instead if necessary.
+ *
* Sets the write timeout of the channel in milliseconds. If a write
* operation is not completed within the write timeout, an
* {@link IOException} will be raised. If the {@link Channel} does not
@@ -139,5 +143,6 @@ public interface ChannelConfig {
* @param writeTimeoutMillis the write timeout in milliseconds.
* {@code 0} to disable.
*/
+ @Deprecated
void setWriteTimeoutMillis(int writeTimeoutMillis);
}
diff --git a/src/main/java/org/jboss/netty/channel/socket/DefaultServerSocketChannelConfig.java b/src/main/java/org/jboss/netty/channel/socket/DefaultServerSocketChannelConfig.java
index 4c438387db..99815768d6 100644
--- a/src/main/java/org/jboss/netty/channel/socket/DefaultServerSocketChannelConfig.java
+++ b/src/main/java/org/jboss/netty/channel/socket/DefaultServerSocketChannelConfig.java
@@ -163,10 +163,12 @@ public class DefaultServerSocketChannelConfig implements ServerSocketChannelConf
// Unused
}
+ @Deprecated
public int getWriteTimeoutMillis() {
return 0;
}
+ @Deprecated
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
// Unused
}
diff --git a/src/main/java/org/jboss/netty/channel/socket/DefaultSocketChannelConfig.java b/src/main/java/org/jboss/netty/channel/socket/DefaultSocketChannelConfig.java
index dc50f27fc8..f3e62dc8f6 100644
--- a/src/main/java/org/jboss/netty/channel/socket/DefaultSocketChannelConfig.java
+++ b/src/main/java/org/jboss/netty/channel/socket/DefaultSocketChannelConfig.java
@@ -83,8 +83,6 @@ public class DefaultSocketChannelConfig implements SocketChannelConfig {
setSoLinger(ConversionUtil.toInt(value));
} else if (key.equals("trafficClass")) {
setTrafficClass(ConversionUtil.toInt(value));
- } else if (key.equals("writeTimeoutMillis")) {
- setWriteTimeoutMillis(ConversionUtil.toInt(value));
} else if (key.equals("connectTimeoutMillis")) {
setConnectTimeoutMillis(ConversionUtil.toInt(value));
} else if (key.equals("pipelineFactory")) {
@@ -237,6 +235,7 @@ public class DefaultSocketChannelConfig implements SocketChannelConfig {
return null;
}
+ @Deprecated
public int getWriteTimeoutMillis() {
return 0;
}
@@ -252,6 +251,7 @@ public class DefaultSocketChannelConfig implements SocketChannelConfig {
// Unused
}
+ @Deprecated
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
// Unused
}
diff --git a/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelConfig.java b/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelConfig.java
index f83352f220..1671f1b527 100644
--- a/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelConfig.java
+++ b/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelConfig.java
@@ -60,6 +60,7 @@ class EmbeddedChannelConfig implements ChannelConfig {
return bufferFactory;
}
+ @Deprecated
public int getWriteTimeoutMillis() {
return 0;
}
@@ -80,6 +81,7 @@ class EmbeddedChannelConfig implements ChannelConfig {
// Unused
}
+ @Deprecated
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
// Unused
}