public JettyAnnotatedEventDriver(WebSocketPolicy policy, Object websocket, JettyAnnotatedMetadata events)
{
super(policy,websocket);
this.events = events;
WebSocket anno = websocket.getClass().getAnnotation(WebSocket.class);
// Setup the policy
if (anno.maxTextMessageSize() > 0)
{
this.policy.setMaxTextMessageSize(anno.maxTextMessageSize());
}
if (anno.maxBinaryMessageSize() > 0)
{
this.policy.setMaxBinaryMessageSize(anno.maxBinaryMessageSize());
}
if (anno.inputBufferSize() > 0)
{
this.policy.setInputBufferSize(anno.inputBufferSize());
}
if (anno.maxIdleTime() > 0)
{
this.policy.setIdleTimeout(anno.maxIdleTime());
}
}