diff --git a/src/main/java/org/jboss/netty/example/http/HttpClient.java b/src/main/java/org/jboss/netty/example/http/HttpClient.java index 3c73ff3ea8..cfa5a30570 100644 --- a/src/main/java/org/jboss/netty/example/http/HttpClient.java +++ b/src/main/java/org/jboss/netty/example/http/HttpClient.java @@ -35,7 +35,7 @@ import org.jboss.netty.handler.codec.http.HttpHeaders; import org.jboss.netty.handler.codec.http.HttpMethod; import org.jboss.netty.handler.codec.http.HttpRequest; import org.jboss.netty.handler.codec.http.HttpVersion; -import org.jboss.netty.handler.codec.http.HttpCookieEncoder; +import org.jboss.netty.handler.codec.http.CookieEncoder; /** * @author The Netty Project (netty-dev@lists.jboss.org) @@ -91,7 +91,7 @@ public class HttpClient { HttpRequest request = new DefaultHttpRequest( HttpVersion.HTTP_1_0, HttpMethod.GET, uri.toASCIIString()); request.addHeader(HttpHeaders.Names.HOST, host); - HttpCookieEncoder httpCookieEncoder = new HttpCookieEncoder(); + CookieEncoder httpCookieEncoder = new CookieEncoder(); httpCookieEncoder.addCookie("my-cookie", "foo"); httpCookieEncoder.addCookie("another-cookie", "bar"); request.addHeader(HttpHeaders.Names.COOKIE, httpCookieEncoder.encode()); diff --git a/src/main/java/org/jboss/netty/example/http/HttpRequestHandler.java b/src/main/java/org/jboss/netty/example/http/HttpRequestHandler.java index ce7a950d46..623b33865d 100644 --- a/src/main/java/org/jboss/netty/example/http/HttpRequestHandler.java +++ b/src/main/java/org/jboss/netty/example/http/HttpRequestHandler.java @@ -35,9 +35,9 @@ import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelHandler; import org.jboss.netty.handler.codec.http.DefaultHttpResponse; import org.jboss.netty.handler.codec.http.HttpChunk; -import org.jboss.netty.handler.codec.http.HttpCookie; -import org.jboss.netty.handler.codec.http.HttpCookieDecoder; -import org.jboss.netty.handler.codec.http.HttpCookieEncoder; +import org.jboss.netty.handler.codec.http.Cookie; +import org.jboss.netty.handler.codec.http.CookieDecoder; +import org.jboss.netty.handler.codec.http.CookieEncoder; import org.jboss.netty.handler.codec.http.HttpHeaders; import org.jboss.netty.handler.codec.http.HttpRequest; import org.jboss.netty.handler.codec.http.HttpResponse; @@ -131,12 +131,12 @@ public class HttpRequestHandler extends SimpleChannelHandler { response.setHeader(HttpHeaders.Names.CONTENT_TYPE, "text/plain; charset=UTF-8"); response.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(buf.readableBytes())); - HttpCookieDecoder cookieDecoder = new HttpCookieDecoder(); - Map cookies = cookieDecoder.decode(request.getHeader(HttpHeaders.Names.COOKIE)); + CookieDecoder cookieDecoder = new CookieDecoder(); + Map cookies = cookieDecoder.decode(request.getHeader(HttpHeaders.Names.COOKIE)); if(!cookies.isEmpty()) { // Reset the cookies if necessary. - HttpCookieEncoder cookieEncoder = new HttpCookieEncoder(); - for (HttpCookie cookie : cookies.values()) { + CookieEncoder cookieEncoder = new CookieEncoder(); + for (Cookie cookie : cookies.values()) { cookieEncoder.addCookie(cookie); } response.addHeader(HttpHeaders.Names.SET_COOKIE, cookieEncoder.encode()); diff --git a/src/main/java/org/jboss/netty/example/http/LocalTransportRegister.java b/src/main/java/org/jboss/netty/example/http/LocalTransportRegister.java index cc8e384f44..a8741f7c44 100644 --- a/src/main/java/org/jboss/netty/example/http/LocalTransportRegister.java +++ b/src/main/java/org/jboss/netty/example/http/LocalTransportRegister.java @@ -37,8 +37,6 @@ import org.jboss.netty.example.echo.EchoHandler; * @author The Netty Project (netty-dev@lists.jboss.org) * @author Andy Taylor (andy.taylor@jboss.org) * @version $Rev$, $Date$ - * - * FIXME: Better name */ public class LocalTransportRegister {