Restoring JSR356 Session.setMax*MessageBufferSize() spec behavior

This commit is contained in:
Joakim Erdfelt 2017-06-20 13:40:05 -07:00
parent b7959456fb
commit d0513ecbe6
1 changed files with 14 additions and 4 deletions

View File

@ -337,11 +337,16 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
getJsrEndpointFunctions().removeMessageHandler(handler);
}
}
/**
* Maximum size of a whole BINARY message that this implementation can buffer.
*
* @param length the length in bytes
*/
@Override
public void setMaxBinaryMessageBufferSize(int length)
{
getPolicy().setMaxBinaryMessageBufferSize(length);
getPolicy().setMaxBinaryMessageSize(length);
}
@Override
@ -350,11 +355,16 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
getPolicy().setIdleTimeout(milliseconds);
super.setIdleTimeout(milliseconds);
}
/**
* Maximum size of a whole TEXT message that this implementation can buffer.
*
* @param length the length in bytes
*/
@Override
public void setMaxTextMessageBufferSize(int length)
{
getPolicy().setMaxTextMessageBufferSize(length);
getPolicy().setMaxTextMessageSize(length);
}
public void setPathParameters(Map<String, String> pathParams)