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

@ -338,10 +338,15 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
}
}
/**
* 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
@ -351,10 +356,15 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess
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)