Ensure all fields follow our naming convention (#393)
- Fix naming issues in SPDY - For backward compatibility, the methods with bad names were deprecated
This commit is contained in:
parent
c7a96c18d8
commit
b9906e94a3
@ -36,6 +36,10 @@ public class DefaultSpdySettingsFrame implements SpdySettingsFrame {
|
||||
}
|
||||
|
||||
public Set<Integer> getIDs() {
|
||||
return getIds();
|
||||
}
|
||||
|
||||
public Set<Integer> getIds() {
|
||||
return settingsMap.keySet();
|
||||
}
|
||||
|
||||
@ -80,6 +84,10 @@ public class DefaultSpdySettingsFrame implements SpdySettingsFrame {
|
||||
}
|
||||
|
||||
public boolean persistValue(int ID) {
|
||||
return isPersistValue(ID);
|
||||
}
|
||||
|
||||
public boolean isPersistValue(int ID) {
|
||||
Integer key = new Integer(ID);
|
||||
if (settingsMap.containsKey(key)) {
|
||||
return settingsMap.get(key).getPersist();
|
||||
|
@ -201,7 +201,7 @@ public class SpdyFrameEncoder extends OneToOneEncoder {
|
||||
SpdySettingsFrame spdySettingsFrame = (SpdySettingsFrame) msg;
|
||||
byte flags = spdySettingsFrame.clearPreviouslyPersistedSettings() ?
|
||||
SPDY_SETTINGS_CLEAR : 0;
|
||||
Set<Integer> IDs = spdySettingsFrame.getIDs();
|
||||
Set<Integer> IDs = spdySettingsFrame.getIds();
|
||||
int numEntries = IDs.size();
|
||||
int length = 4 + numEntries * 8;
|
||||
ChannelBuffer frame = ChannelBuffers.buffer(
|
||||
@ -214,7 +214,7 @@ public class SpdyFrameEncoder extends OneToOneEncoder {
|
||||
for (Integer ID: IDs) {
|
||||
int id = ID.intValue();
|
||||
byte ID_flags = (byte) 0;
|
||||
if (spdySettingsFrame.persistValue(id)) {
|
||||
if (spdySettingsFrame.isPersistValue(id)) {
|
||||
ID_flags |= SPDY_SETTINGS_PERSIST_VALUE;
|
||||
}
|
||||
if (spdySettingsFrame.isPersisted(id)) {
|
||||
|
@ -31,11 +31,17 @@ public interface SpdySettingsFrame {
|
||||
int SETTINGS_INITIAL_WINDOW_SIZE = 7;
|
||||
int SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE = 8;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getIds()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
Set<Integer> getIDs();
|
||||
|
||||
/**
|
||||
* Returns a {@code Set} of the setting IDs.
|
||||
* The set's iterator will return the IDs in ascending order.
|
||||
*/
|
||||
Set<Integer> getIDs();
|
||||
Set<Integer> getIds();
|
||||
|
||||
/**
|
||||
* Returns {@code true} if the setting ID has a value.
|
||||
@ -68,12 +74,18 @@ public interface SpdySettingsFrame {
|
||||
*/
|
||||
void removeValue(int ID);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #isPersistValue(int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean persistValue(int ID);
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this setting should be persisted.
|
||||
* Returns {@code false} if this setting should not be persisted
|
||||
* or if the setting ID has no value.
|
||||
*/
|
||||
boolean persistValue(int ID);
|
||||
boolean isPersistValue(int ID);
|
||||
|
||||
/**
|
||||
* Sets if this setting should be persisted.
|
||||
|
Loading…
x
Reference in New Issue
Block a user