ID -> Id (#393 Ensure all fields follow our naming convention)
This commit is contained in:
parent
60de50d89e
commit
9bf0ad8329
@ -22,51 +22,51 @@ import io.netty.util.internal.StringUtil;
|
|||||||
*/
|
*/
|
||||||
public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
|
public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
|
||||||
|
|
||||||
private int lastGoodStreamID;
|
private int lastGoodStreamId;
|
||||||
private SpdySessionStatus status;
|
private SpdySessionStatus status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
* @param lastGoodStreamID the Last-good-stream-ID of this frame
|
* @param lastGoodStreamId the Last-good-stream-ID of this frame
|
||||||
*/
|
*/
|
||||||
public DefaultSpdyGoAwayFrame(int lastGoodStreamID) {
|
public DefaultSpdyGoAwayFrame(int lastGoodStreamId) {
|
||||||
this(lastGoodStreamID, 0);
|
this(lastGoodStreamId, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
* @param lastGoodStreamID the Last-good-stream-ID of this frame
|
* @param lastGoodStreamId the Last-good-stream-ID of this frame
|
||||||
* @param statusCode the Status code of this frame
|
* @param statusCode the Status code of this frame
|
||||||
*/
|
*/
|
||||||
public DefaultSpdyGoAwayFrame(int lastGoodStreamID, int statusCode) {
|
public DefaultSpdyGoAwayFrame(int lastGoodStreamId, int statusCode) {
|
||||||
this(lastGoodStreamID, SpdySessionStatus.valueOf(statusCode));
|
this(lastGoodStreamId, SpdySessionStatus.valueOf(statusCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
* @param lastGoodStreamID the Last-good-stream-ID of this frame
|
* @param lastGoodStreamId the Last-good-stream-ID of this frame
|
||||||
* @param status the status of this frame
|
* @param status the status of this frame
|
||||||
*/
|
*/
|
||||||
public DefaultSpdyGoAwayFrame(int lastGoodStreamID, SpdySessionStatus status) {
|
public DefaultSpdyGoAwayFrame(int lastGoodStreamId, SpdySessionStatus status) {
|
||||||
setLastGoodStreamID(lastGoodStreamID);
|
setLastGoodStreamId(lastGoodStreamId);
|
||||||
setStatus(status);
|
setStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLastGoodStreamID() {
|
public int getLastGoodStreamId() {
|
||||||
return lastGoodStreamID;
|
return lastGoodStreamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLastGoodStreamID(int lastGoodStreamID) {
|
public void setLastGoodStreamId(int lastGoodStreamId) {
|
||||||
if (lastGoodStreamID < 0) {
|
if (lastGoodStreamId < 0) {
|
||||||
throw new IllegalArgumentException("Last-good-stream-ID"
|
throw new IllegalArgumentException("Last-good-stream-ID"
|
||||||
+ " cannot be negative: " + lastGoodStreamID);
|
+ " cannot be negative: " + lastGoodStreamId);
|
||||||
}
|
}
|
||||||
this.lastGoodStreamID = lastGoodStreamID;
|
this.lastGoodStreamId = lastGoodStreamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -85,7 +85,7 @@ public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
|
|||||||
buf.append(getClass().getSimpleName());
|
buf.append(getClass().getSimpleName());
|
||||||
buf.append(StringUtil.NEWLINE);
|
buf.append(StringUtil.NEWLINE);
|
||||||
buf.append("--> Last-good-stream-ID = ");
|
buf.append("--> Last-good-stream-ID = ");
|
||||||
buf.append(lastGoodStreamID);
|
buf.append(lastGoodStreamId);
|
||||||
buf.append(StringUtil.NEWLINE);
|
buf.append(StringUtil.NEWLINE);
|
||||||
buf.append("--> Status: ");
|
buf.append("--> Status: ");
|
||||||
buf.append(status.toString());
|
buf.append(status.toString());
|
||||||
|
@ -239,7 +239,7 @@ public class SpdyFrameEncoder extends MessageToByteEncoder<Object> {
|
|||||||
out.writeShort(version | 0x8000);
|
out.writeShort(version | 0x8000);
|
||||||
out.writeShort(SPDY_GOAWAY_FRAME);
|
out.writeShort(SPDY_GOAWAY_FRAME);
|
||||||
out.writeInt(length);
|
out.writeInt(length);
|
||||||
out.writeInt(spdyGoAwayFrame.getLastGoodStreamID());
|
out.writeInt(spdyGoAwayFrame.getLastGoodStreamId());
|
||||||
if (version >= 3) {
|
if (version >= 3) {
|
||||||
out.writeInt(spdyGoAwayFrame.getStatus().getCode());
|
out.writeInt(spdyGoAwayFrame.getStatus().getCode());
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ public interface SpdyGoAwayFrame {
|
|||||||
/**
|
/**
|
||||||
* Returns the Last-good-stream-ID of this frame.
|
* Returns the Last-good-stream-ID of this frame.
|
||||||
*/
|
*/
|
||||||
int getLastGoodStreamID();
|
int getLastGoodStreamId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Last-good-stream-ID of this frame. The Last-good-stream-ID
|
* Sets the Last-good-stream-ID of this frame. The Last-good-stream-ID
|
||||||
* cannot be negative.
|
* cannot be negative.
|
||||||
*/
|
*/
|
||||||
void setLastGoodStreamID(int lastGoodStreamID);
|
void setLastGoodStreamId(int lastGoodStreamId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the status of this frame.
|
* Returns the status of this frame.
|
||||||
|
@ -87,7 +87,7 @@ public class SpdySessionHandlerTest {
|
|||||||
Assert.assertNotNull(msg);
|
Assert.assertNotNull(msg);
|
||||||
Assert.assertTrue(msg instanceof SpdyGoAwayFrame);
|
Assert.assertTrue(msg instanceof SpdyGoAwayFrame);
|
||||||
SpdyGoAwayFrame spdyGoAwayFrame = (SpdyGoAwayFrame) msg;
|
SpdyGoAwayFrame spdyGoAwayFrame = (SpdyGoAwayFrame) msg;
|
||||||
Assert.assertTrue(spdyGoAwayFrame.getLastGoodStreamID() == lastGoodStreamID);
|
Assert.assertTrue(spdyGoAwayFrame.getLastGoodStreamId() == lastGoodStreamID);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void assertHeaders(Object msg, int streamID, SpdyHeaderBlock headers) {
|
private static void assertHeaders(Object msg, int streamID, SpdyHeaderBlock headers) {
|
||||||
|
Loading…
Reference in New Issue
Block a user