diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java index 5bacea4ba5..eff3637ca0 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyFrameEncoder.java @@ -138,8 +138,8 @@ public class SpdyFrameEncoder extends OneToOneEncoder { frame.writeShort(SPDY_SYN_STREAM_FRAME); frame.writeByte(flags); frame.writeMedium(length); - frame.writeInt(spdySynStreamFrame.getStreamID()); - frame.writeInt(spdySynStreamFrame.getAssociatedToStreamID()); + frame.writeInt(spdySynStreamFrame.getStreamId()); + frame.writeInt(spdySynStreamFrame.getAssociatedToStreamId()); if (version < 3) { // Restrict priorities for SPDY/2 to between 0 and 3 byte priority = spdySynStreamFrame.getPriority(); @@ -253,7 +253,7 @@ public class SpdyFrameEncoder extends OneToOneEncoder { frame.writeShort(version | 0x8000); frame.writeShort(SPDY_PING_FRAME); frame.writeInt(4); - frame.writeInt(spdyPingFrame.getID()); + frame.writeInt(spdyPingFrame.getId()); return frame; } else if (msg instanceof SpdyGoAwayFrame) { diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpDecoder.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpDecoder.java index 906c84292f..56dfc6874f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpDecoder.java @@ -89,11 +89,11 @@ public class SpdyHttpDecoder extends OneToOneDecoder { // HTTP requests/responses are mapped one-to-one to SPDY streams. SpdySynStreamFrame spdySynStreamFrame = (SpdySynStreamFrame) msg; - int streamID = spdySynStreamFrame.getStreamID(); + int streamID = spdySynStreamFrame.getStreamId(); if (SpdyCodecUtil.isServerID(streamID)) { // SYN_STREAM frames initiated by the server are pushed resources - int associatedToStreamID = spdySynStreamFrame.getAssociatedToStreamID(); + int associatedToStreamID = spdySynStreamFrame.getAssociatedToStreamId(); // If a client receives a SYN_STREAM with an Associated-To-Stream-ID of 0 // it must reply with a RST_STREAM with error code INVALID_STREAM diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpEncoder.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpEncoder.java index 97247396ab..5ef10dc77d 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHttpEncoder.java @@ -164,7 +164,7 @@ public class SpdyHttpEncoder implements ChannelDownstreamHandler { HttpRequest httpRequest = (HttpRequest) msg; SpdySynStreamFrame spdySynStreamFrame = createSynStreamFrame(httpRequest); - int streamID = spdySynStreamFrame.getStreamID(); + int streamID = spdySynStreamFrame.getStreamId(); ChannelFuture future = getContentFuture(ctx, e, streamID, httpRequest); Channels.write(ctx, future, spdySynStreamFrame, e.getRemoteAddress()); @@ -173,7 +173,7 @@ public class SpdyHttpEncoder implements ChannelDownstreamHandler { HttpResponse httpResponse = (HttpResponse) msg; if (httpResponse.containsHeader(SpdyHttpHeaders.Names.ASSOCIATED_TO_STREAM_ID)) { SpdySynStreamFrame spdySynStreamFrame = createSynStreamFrame(httpResponse); - int streamID = spdySynStreamFrame.getStreamID(); + int streamID = spdySynStreamFrame.getStreamId(); ChannelFuture future = getContentFuture(ctx, e, streamID, httpResponse); Channels.write(ctx, future, spdySynStreamFrame, e.getRemoteAddress()); } else { diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandler.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandler.java index e108377401..d0cbbf9141 100644 --- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandler.java +++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandler.java @@ -215,7 +215,7 @@ public class SpdySessionHandler extends SimpleChannelUpstreamHandler */ SpdySynStreamFrame spdySynStreamFrame = (SpdySynStreamFrame) msg; - int streamID = spdySynStreamFrame.getStreamID(); + int streamID = spdySynStreamFrame.getStreamId(); // Check if we received a valid SYN_STREAM frame if (spdySynStreamFrame.isInvalid() || @@ -326,7 +326,7 @@ public class SpdySessionHandler extends SimpleChannelUpstreamHandler SpdyPingFrame spdyPingFrame = (SpdyPingFrame) msg; - if (isRemoteInitiatedID(spdyPingFrame.getID())) { + if (isRemoteInitiatedID(spdyPingFrame.getId())) { Channels.write(ctx, Channels.future(e.getChannel()), spdyPingFrame, e.getRemoteAddress()); return; } @@ -530,7 +530,7 @@ public class SpdySessionHandler extends SimpleChannelUpstreamHandler } else if (msg instanceof SpdySynStreamFrame) { SpdySynStreamFrame spdySynStreamFrame = (SpdySynStreamFrame) msg; - int streamID = spdySynStreamFrame.getStreamID(); + int streamID = spdySynStreamFrame.getStreamId(); if (isRemoteInitiatedID(streamID)) { e.getFuture().setFailure(PROTOCOL_EXCEPTION); @@ -595,9 +595,9 @@ public class SpdySessionHandler extends SimpleChannelUpstreamHandler } else if (msg instanceof SpdyPingFrame) { SpdyPingFrame spdyPingFrame = (SpdyPingFrame) msg; - if (isRemoteInitiatedID(spdyPingFrame.getID())) { + if (isRemoteInitiatedID(spdyPingFrame.getId())) { e.getFuture().setFailure(new IllegalArgumentException( - "invalid PING ID: " + spdyPingFrame.getID())); + "invalid PING ID: " + spdyPingFrame.getId())); return; } pings.getAndIncrement(); diff --git a/src/test/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandlerTest.java b/src/test/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandlerTest.java index a206425879..182f52e0f8 100644 --- a/src/test/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandlerTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/spdy/SpdySessionHandlerTest.java @@ -79,7 +79,7 @@ public class SpdySessionHandlerTest { Assert.assertNotNull(msg); Assert.assertTrue(msg instanceof SpdyPingFrame); SpdyPingFrame spdyPingFrame = (SpdyPingFrame) msg; - Assert.assertTrue(spdyPingFrame.getID() == ID); + Assert.assertTrue(spdyPingFrame.getId() == ID); } private static void assertGoAway(Object msg, int lastGoodStreamID) { @@ -153,7 +153,7 @@ public class SpdySessionHandlerTest { // Check if session handler closed the streams using the number // of concurrent streams and that it returns REFUSED_STREAM // if it receives a SYN_STREAM frame it does not wish to accept - spdySynStreamFrame.setStreamID(localStreamID); + spdySynStreamFrame.setStreamId(localStreamID); spdySynStreamFrame.setLast(true); spdySynStreamFrame.setUnidirectional(true); sessionHandler.offer(spdySynStreamFrame); @@ -181,11 +181,11 @@ public class SpdySessionHandlerTest { // Check if session handler returns PROTOCOL_ERROR if it receives // a SYN_STREAM frame with an invalid Stream-ID - spdySynStreamFrame.setStreamID(localStreamID - 1); + spdySynStreamFrame.setStreamId(localStreamID - 1); sessionHandler.offer(spdySynStreamFrame); assertRstStream(sessionHandler.poll(), localStreamID - 1, SpdyStreamStatus.PROTOCOL_ERROR); Assert.assertNull(sessionHandler.peek()); - spdySynStreamFrame.setStreamID(localStreamID); + spdySynStreamFrame.setStreamId(localStreamID); // Check if session handler correctly limits the number of // concurrent streams in the SETTINGS frame @@ -223,7 +223,7 @@ public class SpdySessionHandlerTest { // Check if session handler returns identical local PINGs sessionHandler.offer(localPingFrame); - assertPing(sessionHandler.poll(), localPingFrame.getID()); + assertPing(sessionHandler.poll(), localPingFrame.getId()); Assert.assertNull(sessionHandler.peek()); // Check if session handler ignores un-initiated remote PINGs @@ -238,7 +238,7 @@ public class SpdySessionHandlerTest { // Check if session handler returns REFUSED_STREAM if it receives // SYN_STREAM frames after sending a GOAWAY frame - spdySynStreamFrame.setStreamID(localStreamID); + spdySynStreamFrame.setStreamId(localStreamID); sessionHandler.offer(spdySynStreamFrame); assertRstStream(sessionHandler.poll(), localStreamID, SpdyStreamStatus.REFUSED_STREAM); Assert.assertNull(sessionHandler.peek()); @@ -288,11 +288,11 @@ public class SpdySessionHandlerTest { new DefaultSpdySynStreamFrame(streamID, 0, (byte) 0); spdySynStreamFrame.setLast(true); Channels.write(e.getChannel(), spdySynStreamFrame); - spdySynStreamFrame.setStreamID(spdySynStreamFrame.getStreamID() + 2); + spdySynStreamFrame.setStreamId(spdySynStreamFrame.getStreamId() + 2); Channels.write(e.getChannel(), spdySynStreamFrame); - spdySynStreamFrame.setStreamID(spdySynStreamFrame.getStreamID() + 2); + spdySynStreamFrame.setStreamId(spdySynStreamFrame.getStreamId() + 2); Channels.write(e.getChannel(), spdySynStreamFrame); - spdySynStreamFrame.setStreamID(spdySynStreamFrame.getStreamID() + 2); + spdySynStreamFrame.setStreamId(spdySynStreamFrame.getStreamId() + 2); Channels.write(e.getChannel(), spdySynStreamFrame); // Limit the number of concurrent streams to 3 @@ -317,7 +317,7 @@ public class SpdySessionHandlerTest { SpdySynStreamFrame spdySynStreamFrame = (SpdySynStreamFrame) msg; - int streamID = spdySynStreamFrame.getStreamID(); + int streamID = spdySynStreamFrame.getStreamId(); SpdySynReplyFrame spdySynReplyFrame = new DefaultSpdySynReplyFrame(streamID); spdySynReplyFrame.setLast(spdySynStreamFrame.isLast()); for (Map.Entry entry: spdySynStreamFrame.getHeaders()) {