[ 
https://issues.apache.org/jira/browse/FLINK-7738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191101#comment-16191101
 ] 

ASF GitHub Bot commented on FLINK-7738:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4767#discussion_r142634073
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java ---
    @@ -275,4 +301,121 @@ public HttpResponseStatus getHttpResponseStatus() {
                        return httpResponseStatus;
                }
        }
    +
    +   public <M extends MessageHeaders<EmptyRequestBody, 
WebSocketUpgradeResponseBody, U>, U extends MessageParameters, R extends 
ResponseBody> CompletableFuture<WebSocket> sendWebSocketRequest(String 
targetAddress, int targetPort, M messageHeaders, U messageParameters, Class<R> 
messageClazz, WebSocketListener... listeners) throws IOException {
    --- End diff --
    
    I really dislike how the `WebSocketUpgradeResponseBody` is defined as the 
response in the headers. Not only is this not the actual response we're getting 
back (that would be R), we now also introduce an arbitrary response type, which 
voids the type safety and prevents us from auto-generating proper documentation.
    
    The MessageHeaders are very much a high-level user-facing specification, 
but here we're using it for the setup of the websockets which is a pretty 
relatively low-level affair.


> Create WebSocket handler (server)
> ---------------------------------
>
>                 Key: FLINK-7738
>                 URL: https://issues.apache.org/jira/browse/FLINK-7738
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Cluster Management, Mesos
>            Reporter: Eron Wright 
>            Assignee: Eron Wright 
>
> An abstract handler is needed to support websocket communication.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to