Cleanup and remove get prefix of method to be more inline with our API
This commit is contained in:
parent
3ce35c710a
commit
eca5613534
@ -46,14 +46,14 @@ public abstract class SpdyOrHttpChooser extends ByteToMessageDecoder {
|
||||
HTTP_1_0("http/1.0"),
|
||||
UNKNOWN("Unknown");
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
private SelectedProtocol(String defaultName) {
|
||||
this.name = defaultName;
|
||||
SelectedProtocol(String defaultName) {
|
||||
name = defaultName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
public String protocolName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -63,10 +63,9 @@ public abstract class SpdyOrHttpChooser extends ByteToMessageDecoder {
|
||||
* the protocol name
|
||||
* @return the SelectedProtocol instance
|
||||
*/
|
||||
public static SelectedProtocol getProtocolByName(String name) {
|
||||
|
||||
public static SelectedProtocol protocol(String name) {
|
||||
for (SelectedProtocol protocol : SelectedProtocol.values()) {
|
||||
if (protocol.getName().equals(name)) {
|
||||
if (protocol.protocolName().equals(name)) {
|
||||
return protocol;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user