ID -> Id (#393 Ensure all fields follow our naming convention)

This commit is contained in:
Trustin Lee 2012-06-12 20:29:06 +09:00
parent 60de50d89e
commit 9bf0ad8329
4 changed files with 21 additions and 21 deletions

View File

@ -22,51 +22,51 @@ import io.netty.util.internal.StringUtil;
*/
public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
private int lastGoodStreamID;
private int lastGoodStreamId;
private SpdySessionStatus status;
/**
* 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) {
this(lastGoodStreamID, 0);
public DefaultSpdyGoAwayFrame(int lastGoodStreamId) {
this(lastGoodStreamId, 0);
}
/**
* 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
*/
public DefaultSpdyGoAwayFrame(int lastGoodStreamID, int statusCode) {
this(lastGoodStreamID, SpdySessionStatus.valueOf(statusCode));
public DefaultSpdyGoAwayFrame(int lastGoodStreamId, int statusCode) {
this(lastGoodStreamId, SpdySessionStatus.valueOf(statusCode));
}
/**
* 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
*/
public DefaultSpdyGoAwayFrame(int lastGoodStreamID, SpdySessionStatus status) {
setLastGoodStreamID(lastGoodStreamID);
public DefaultSpdyGoAwayFrame(int lastGoodStreamId, SpdySessionStatus status) {
setLastGoodStreamId(lastGoodStreamId);
setStatus(status);
}
@Override
public int getLastGoodStreamID() {
return lastGoodStreamID;
public int getLastGoodStreamId() {
return lastGoodStreamId;
}
@Override
public void setLastGoodStreamID(int lastGoodStreamID) {
if (lastGoodStreamID < 0) {
public void setLastGoodStreamId(int lastGoodStreamId) {
if (lastGoodStreamId < 0) {
throw new IllegalArgumentException("Last-good-stream-ID"
+ " cannot be negative: " + lastGoodStreamID);
+ " cannot be negative: " + lastGoodStreamId);
}
this.lastGoodStreamID = lastGoodStreamID;
this.lastGoodStreamId = lastGoodStreamId;
}
@Override
@ -85,7 +85,7 @@ public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
buf.append(getClass().getSimpleName());
buf.append(StringUtil.NEWLINE);
buf.append("--> Last-good-stream-ID = ");
buf.append(lastGoodStreamID);
buf.append(lastGoodStreamId);
buf.append(StringUtil.NEWLINE);
buf.append("--> Status: ");
buf.append(status.toString());

View File

@ -239,7 +239,7 @@ public class SpdyFrameEncoder extends MessageToByteEncoder<Object> {
out.writeShort(version | 0x8000);
out.writeShort(SPDY_GOAWAY_FRAME);
out.writeInt(length);
out.writeInt(spdyGoAwayFrame.getLastGoodStreamID());
out.writeInt(spdyGoAwayFrame.getLastGoodStreamId());
if (version >= 3) {
out.writeInt(spdyGoAwayFrame.getStatus().getCode());
}

View File

@ -23,13 +23,13 @@ public interface SpdyGoAwayFrame {
/**
* 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
* cannot be negative.
*/
void setLastGoodStreamID(int lastGoodStreamID);
void setLastGoodStreamId(int lastGoodStreamId);
/**
* Returns the status of this frame.

View File

@ -87,7 +87,7 @@ public class SpdySessionHandlerTest {
Assert.assertNotNull(msg);
Assert.assertTrue(msg instanceof SpdyGoAwayFrame);
SpdyGoAwayFrame spdyGoAwayFrame = (SpdyGoAwayFrame) msg;
Assert.assertTrue(spdyGoAwayFrame.getLastGoodStreamID() == lastGoodStreamID);
Assert.assertTrue(spdyGoAwayFrame.getLastGoodStreamId() == lastGoodStreamID);
}
private static void assertHeaders(Object msg, int streamID, SpdyHeaderBlock headers) {