org.frameworkset.web.socket.inf.PongMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bboss-websocket Show documentation
Show all versions of bboss-websocket Show documentation
bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com
package org.frameworkset.web.socket.inf;
import java.nio.ByteBuffer;
public class PongMessage extends AbstractWebSocketMessage {
/**
* Create a new pong message with an empty payload.
*/
public PongMessage() {
super(ByteBuffer.allocate(0));
}
/**
* Create a new pong message with the given ByteBuffer payload.
* @param payload the non-null payload
*/
public PongMessage(ByteBuffer payload) {
super(payload);
}
@Override
public int getPayloadLength() {
return (getPayload() != null) ? getPayload().remaining() : 0;
}
@Override
protected String toStringPayload() {
return (getPayload() != null) ? getPayload().toString() : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy