JSR-356 - Handling ClientContainer.setMax(Text|Binary)MessageBufferSize better
+ The Jetty API is more configurable than the JSR, this forces the Jetty side API to be consistent for whatever value the end user specifies.
This commit is contained in:
parent
b3aee8e4d5
commit
2362a4e8b3
|
@ -282,13 +282,14 @@ public class ClientContainer implements WebSocketContainer
|
||||||
@Override
|
@Override
|
||||||
public void setAsyncSendTimeout(long timeoutmillis)
|
public void setAsyncSendTimeout(long timeoutmillis)
|
||||||
{
|
{
|
||||||
|
client.setMaxIdleTimeout(timeoutmillis);
|
||||||
client.setAsyncWriteTimeout(timeoutmillis);
|
client.setAsyncWriteTimeout(timeoutmillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDefaultMaxBinaryMessageBufferSize(int max)
|
public void setDefaultMaxBinaryMessageBufferSize(int max)
|
||||||
{
|
{
|
||||||
// TODO: add safety net for policy assertions
|
client.getPolicy().setMaxBinaryMessageSize(max);
|
||||||
client.setMaxBinaryMessageBufferSize(max);
|
client.setMaxBinaryMessageBufferSize(max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,7 +302,7 @@ public class ClientContainer implements WebSocketContainer
|
||||||
@Override
|
@Override
|
||||||
public void setDefaultMaxTextMessageBufferSize(int max)
|
public void setDefaultMaxTextMessageBufferSize(int max)
|
||||||
{
|
{
|
||||||
// TODO: add safety net for policy assertions
|
client.getPolicy().setMaxTextMessageSize(max);
|
||||||
client.setMaxTextMessageBufferSize(max);
|
client.setMaxTextMessageBufferSize(max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue