Adding TODOs from review discussion

This commit is contained in:
Joakim Erdfelt 2012-07-02 10:39:20 -07:00
parent 63ead191bf
commit 40faff2ab7
3 changed files with 15 additions and 1 deletions

View File

@ -17,6 +17,11 @@ public class WebSocketPolicy
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.
* <p>

View File

@ -6,6 +6,10 @@ import org.eclipse.jetty.websocket.api.ExtensionConfig;
public interface WebSocketRequest
{
// TODO: getSession
// TODO: getCookies
// TODO: getRequestAttributes ?
public List<ExtensionConfig> getExtensions();
public String getHeader(String name);

View File

@ -107,6 +107,7 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock
WebSocketCreator creator = getCreator();
Object websocketPojo = creator.createWebSocket(sockreq,sockresp);
// TODO: Handle forbidden?
if (websocketPojo == null)
{
@ -342,13 +343,17 @@ public class WebSocketServerFactory extends AbstractLifeCycle implements WebSock
ByteBufferPool bufferPool = http.getConnector().getByteBufferPool();
WebSocketAsyncConnection connection = new WebSocketAsyncConnection(endp,executor,websocket.getPolicy(),bufferPool);
endp.setAsyncConnection(connection);
connection.getParser().addListener(websocket);
LOG.debug("HttpConnection: {}",http);
LOG.debug("AsyncWebSocketConnection: {}",connection);
// Initialize / Negotiate Extensions
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
LOG.debug("Handshake Response: {}",handshaker);