1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.eclipse.jetty.websocket.server.mux;
20
21 import java.io.IOException;
22 import java.nio.ByteBuffer;
23
24 import org.eclipse.jetty.http.HttpGenerator.ResponseInfo;
25 import org.eclipse.jetty.io.EofException;
26 import org.eclipse.jetty.server.HttpTransport;
27 import org.eclipse.jetty.util.BlockingCallback;
28 import org.eclipse.jetty.util.Callback;
29 import org.eclipse.jetty.util.log.Log;
30 import org.eclipse.jetty.util.log.Logger;
31 import org.eclipse.jetty.websocket.common.extensions.mux.MuxChannel;
32 import org.eclipse.jetty.websocket.common.extensions.mux.Muxer;
33
34
35
36
37 public class HttpTransportOverMux implements HttpTransport
38 {
39 private static final Logger LOG = Log.getLogger(HttpTransportOverMux.class);
40 private final BlockingCallback streamBlocker = new BlockingCallback();
41
42 public HttpTransportOverMux(Muxer muxer, MuxChannel channel)
43 {
44
45 }
46
47 @Override
48 public void completed()
49 {
50 LOG.debug("completed");
51 }
52
53
54
55
56 @Override
57 public void send(ResponseInfo info, ByteBuffer responseBodyContent, boolean lastContent) throws IOException
58 {
59 send(info,responseBodyContent,lastContent,streamBlocker);
60 streamBlocker.block();
61 }
62
63 @Override
64 public void send(ResponseInfo info, ByteBuffer responseBodyContent, boolean lastContent, Callback callback)
65 {
66 if (lastContent == false)
67 {
68
69 }
70
71 if (info.getContentLength() > 0)
72 {
73
74 }
75
76
77
78 }
79
80 @Override
81 public void send(ByteBuffer responseBodyContent, boolean lastContent, Callback callback)
82 {
83 send(null,responseBodyContent, lastContent, callback);
84 }
85 }