netty5/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdySettingsFrame.java

108 lines
3.4 KiB
Java
Raw Normal View History

2012-05-31 09:37:27 +02:00
/*
2013-06-04 23:32:11 +02:00
* Copyright 2013 The Netty Project
2012-05-31 09:37:27 +02:00
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
2012-06-04 22:31:44 +02:00
* http://www.apache.org/licenses/LICENSE-2.0
2012-05-31 09:37:27 +02:00
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.spdy;
import java.util.Set;
/**
2013-06-04 23:32:11 +02:00
* A SPDY Protocol SETTINGS Frame
2012-05-31 09:37:27 +02:00
*/
2013-06-04 23:32:11 +02:00
public interface SpdySettingsFrame extends SpdyFrame {
2012-05-31 09:37:27 +02:00
2013-12-14 19:27:14 +01:00
int SETTINGS_MINOR_VERSION = 0;
2012-05-31 09:37:27 +02:00
int SETTINGS_UPLOAD_BANDWIDTH = 1;
int SETTINGS_DOWNLOAD_BANDWIDTH = 2;
int SETTINGS_ROUND_TRIP_TIME = 3;
int SETTINGS_MAX_CONCURRENT_STREAMS = 4;
int SETTINGS_CURRENT_CWND = 5;
int SETTINGS_DOWNLOAD_RETRANS_RATE = 6;
int SETTINGS_INITIAL_WINDOW_SIZE = 7;
int SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE = 8;
/**
* Returns a {@code Set} of the setting IDs.
* The set's iterator will return the IDs in ascending order.
*/
Set<Integer> ids();
2012-05-31 09:37:27 +02:00
/**
* Returns {@code true} if the setting ID has a value.
*/
boolean isSet(int id);
2012-05-31 09:37:27 +02:00
/**
* Returns the value of the setting ID.
* Returns -1 if the setting ID is not set.
*/
int getValue(int id);
2012-05-31 09:37:27 +02:00
/**
* Sets the value of the setting ID.
2013-12-14 19:27:14 +01:00
* The ID cannot be negative and cannot exceed 16777215.
2012-05-31 09:37:27 +02:00
*/
SpdySettingsFrame setValue(int id, int value);
2012-05-31 09:37:27 +02:00
/**
* Sets the value of the setting ID.
* Sets if the setting should be persisted (should only be set by the server).
* Sets if the setting is persisted (should only be set by the client).
2013-12-14 19:27:14 +01:00
* The ID cannot be negative and cannot exceed 16777215.
2012-05-31 09:37:27 +02:00
*/
SpdySettingsFrame setValue(int id, int value, boolean persistVal, boolean persisted);
2012-05-31 09:37:27 +02:00
/**
* Removes the value of the setting ID.
* Removes all persistence information for the setting.
2012-05-31 09:37:27 +02:00
*/
SpdySettingsFrame removeValue(int id);
2012-05-31 09:37:27 +02:00
/**
* 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 isPersistValue(int id);
2012-05-31 09:37:27 +02:00
/**
* Sets if this setting should be persisted.
* Has no effect if the setting ID has no value.
*/
SpdySettingsFrame setPersistValue(int id, boolean persistValue);
2012-05-31 09:37:27 +02:00
/**
* Returns {@code true} if this setting is persisted.
* Returns {@code false} if this setting should not be persisted
* or if the setting ID has no value.
*/
boolean isPersisted(int id);
2012-05-31 09:37:27 +02:00
/**
* Sets if this setting is persisted.
* Has no effect if the setting ID has no value.
*/
SpdySettingsFrame setPersisted(int id, boolean persisted);
2012-05-31 09:37:27 +02:00
/**
* Returns {@code true} if previously persisted settings should be cleared.
*/
boolean clearPreviouslyPersistedSettings();
/**
* Sets if previously persisted settings should be cleared.
*/
SpdySettingsFrame setClearPreviouslyPersistedSettings(boolean clear);
2012-05-31 09:37:27 +02:00
}