Adding TODOs from review discussion
This commit is contained in:
parent
63ead191bf
commit
40faff2ab7
|
@ -17,6 +17,11 @@ public class WebSocketPolicy
|
||||||
return new WebSocketPolicy(WebSocketBehavior.SERVER);
|
return new WebSocketPolicy(WebSocketBehavior.SERVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Should the generators and parsers auto-fragment large frames?
|
||||||
|
*/
|
||||||
|
private boolean autoFragment = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum size of a text message during parsing/generating.
|
* The maximum size of a text message during parsing/generating.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -6,6 +6,10 @@ import org.eclipse.jetty.websocket.api.ExtensionConfig;
|
||||||
|
|
||||||
public interface WebSocketRequest
|
public interface WebSocketRequest
|
||||||
{
|
{
|
||||||
|
// TODO: getSession
|
||||||
|
// TODO: getCookies
|
||||||
|
// TODO: getRequestAttributes ?
|
||||||
|
|
||||||
public List<ExtensionConfig> getExtensions();
|
public List<ExtensionConfig> getExtensions();
|
||||||
|
|
||||||
public String getHeader(String name);
|
public String getHeader(String name);
|
||||||
|
|
|
@ -107,6 +107,7 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock
|
||||||
WebSocketCreator creator = getCreator();
|
WebSocketCreator creator = getCreator();
|
||||||
|
|
||||||
Object websocketPojo = creator.createWebSocket(sockreq,sockresp);
|
Object websocketPojo = creator.createWebSocket(sockreq,sockresp);
|
||||||
|
// TODO: Handle forbidden?
|
||||||
|
|
||||||
if (websocketPojo == null)
|
if (websocketPojo == null)
|
||||||
{
|
{
|
||||||
|
@ -342,13 +343,17 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock
|
||||||
ByteBufferPool bufferPool = http.getConnector().getByteBufferPool();
|
ByteBufferPool bufferPool = http.getConnector().getByteBufferPool();
|
||||||
WebSocketAsyncConnection connection = new WebSocketAsyncConnection(endp,executor,websocket.getPolicy(),bufferPool);
|
WebSocketAsyncConnection connection = new WebSocketAsyncConnection(endp,executor,websocket.getPolicy(),bufferPool);
|
||||||
endp.setAsyncConnection(connection);
|
endp.setAsyncConnection(connection);
|
||||||
connection.getParser().addListener(websocket);
|
|
||||||
|
|
||||||
LOG.debug("HttpConnection: {}",http);
|
LOG.debug("HttpConnection: {}",http);
|
||||||
LOG.debug("AsyncWebSocketConnection: {}",connection);
|
LOG.debug("AsyncWebSocketConnection: {}",connection);
|
||||||
|
|
||||||
// Initialize / Negotiate Extensions
|
// Initialize / Negotiate Extensions
|
||||||
List<Extension> extensions = initExtensions(request.getExtensions());
|
List<Extension> extensions = initExtensions(request.getExtensions());
|
||||||
|
// TODO : bind extensions? layer extensions? how?
|
||||||
|
// TODO : wrap websocket with extension processing Parser.Listener list
|
||||||
|
connection.getParser().addListener(websocket);
|
||||||
|
// TODO : connection.setWriteExtensions(extensions);
|
||||||
|
// TODO : implement endpoint.write() layer for outgoing extension frames.
|
||||||
|
|
||||||
// Process (version specific) handshake response
|
// Process (version specific) handshake response
|
||||||
LOG.debug("Handshake Response: {}",handshaker);
|
LOG.debug("Handshake Response: {}",handshaker);
|
||||||
|
|
Loading…
Reference in New Issue