public AnnotatedEventDriver(WebSocketPolicy policy, Object websocket, EventMethods events) { super(policy,websocket); this.events = events; WebSocket anno = websocket.getClass().getAnnotation(WebSocket.class); // Setup the policy if (anno.maxMessageSize() > 0) { this.policy.setMaxMessageSize(anno.maxMessageSize()); } if (anno.inputBufferSize() > 0) { this.policy.setInputBufferSize(anno.inputBufferSize()); } if (anno.maxIdleTime() > 0) { this.policy.setIdleTimeout(anno.maxIdleTime()); } }
public AnnotatedEventDriver(WebSocketPolicy policy, Object websocket, EventMethods events) { super(policy,websocket); this.events = events; WebSocket anno = websocket.getClass().getAnnotation(WebSocket.class); // Setup the policy if (anno.maxMessageSize() > 0) { this.policy.setMaxMessageSize(anno.maxMessageSize()); } if (anno.inputBufferSize() > 0) { this.policy.setInputBufferSize(anno.inputBufferSize()); } if (anno.maxIdleTime() > 0) { this.policy.setIdleTimeout(anno.maxIdleTime()); } }
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()); } this.batchMode = anno.batchMode(); }