Description
WebSocketRequestHandler currently implements AjaxRequestTarget.
We can introduce a new interface IPartialPageRequestHandler (or better named), that is implemented by AjaxRequestTarget and WebSocketRequestHandler:
/** * Request handler that allows partial updates of the current page instance. */ public interface IPartialPageRequestHandler extends IPageRequestHandler { void add(final Component component, final String markupId); void add(Component... components); void addChildren(MarkupContainer parent, Class<?> childCriteria); void appendJavaScript(CharSequence javascript); void prependJavaScript(CharSequence javascript); void focusComponent(Component component); String getLastFocusedElementId(); Collection<? extends Component> getComponents(); IHeaderResponse getHeaderResponse(); }
This way it becomes clearer that WebSocketRequestHandler doesn't have anything to do with Ajax.