[#1295] Make sure retain(..) returns the correct WebSocketFrame type
This commit is contained in:
parent
2640832a38
commit
c987dd556e
@ -58,4 +58,16 @@ public class BinaryWebSocketFrame extends WebSocketFrame {
|
||||
public BinaryWebSocketFrame copy() {
|
||||
return new BinaryWebSocketFrame(isFinalFragment(), rsv(), data().copy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BinaryWebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BinaryWebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -143,4 +143,16 @@ public class CloseWebSocketFrame extends WebSocketFrame {
|
||||
public CloseWebSocketFrame copy() {
|
||||
return new CloseWebSocketFrame(isFinalFragment(), rsv(), data().copy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloseWebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloseWebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -124,4 +124,15 @@ public class ContinuationWebSocketFrame extends WebSocketFrame {
|
||||
return new ContinuationWebSocketFrame(isFinalFragment(), rsv(), data().copy(), aggregatedText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContinuationWebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContinuationWebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -58,4 +58,16 @@ public class PingWebSocketFrame extends WebSocketFrame {
|
||||
public PingWebSocketFrame copy() {
|
||||
return new PingWebSocketFrame(isFinalFragment(), rsv(), data().copy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PingWebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PingWebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -59,4 +59,15 @@ public class PongWebSocketFrame extends WebSocketFrame {
|
||||
return new PongWebSocketFrame(isFinalFragment(), rsv(), data().copy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PongWebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PongWebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -98,4 +98,16 @@ public class TextWebSocketFrame extends WebSocketFrame {
|
||||
public TextWebSocketFrame copy() {
|
||||
return new TextWebSocketFrame(isFinalFragment(), rsv(), data().copy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextWebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextWebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,15 @@ public abstract class WebSocketFrame extends DefaultByteBufHolder {
|
||||
return getClass().getSimpleName() + "(data: " + data().toString() + ')';
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebSocketFrame retain() {
|
||||
super.retain();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebSocketFrame retain(int increment) {
|
||||
super.retain(increment);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user