// Path: core/src/main/java/com/threerings/nexus/io/Serializer.java
// public interface Serializer
// {
//     /** Returns the class assigned the supplied code.
//      * @throws NexusException if no class is registered for the supplied code. */
//     Class<?> getClass (short code);
// 
//     /** Returns the streamer for the class assigned the supplied code.
//      * @throws NexusException if no streamer is registered for the supplied code.  */
//     Streamer<?> getStreamer (short code);
// 
//     /** Returns the service factory for the class assigned the supplied code.
//      * @throws NexusException if no service is registered for the supplied code.  */
//     DService.Factory<?> getServiceFactory (short code);
// 
//     /** Returns the code assigned to the supplied class.
//      * @throws NexusException if the class in question is not registered. */
//     short getCode (Class<?> clazz);
// 
//     /** Returns the code assigned to the supplied service class.
//      * @throws NexusException if the class in question is not registered. */
//     short getServiceCode (Class<? extends NexusService> clazz);
// 
//     /** Writes the class code for the supplied value, and returns the streamer for same.
//      * @throws NexusException if the class for the value in question is not registered. */
//     <T> Streamer<T> writeStreamer (Streamable.Output out, T value);
// }


import org.eclipse.jetty.websocket.api.UpgradeRequest;
import org.eclipse.jetty.websocket.api.UpgradeResponse;
import org.eclipse.jetty.websocket.servlet.WebSocketCreator;
import org.eclipse.jetty.websocket.servlet.WebSocketServlet;
import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
import com.threerings.nexus.io.Serializer;
//
// Nexus GWTServer - server-side support for Nexus GWT/WebSockets services
// http://github.com/threerings/nexus/blob/master/LICENSE

package com.threerings.nexus.server;



/**
 * Wires our GWT/IO into Jetty WebSockets.
 */
public class GWTIOJettyServlet extends WebSocketServlet
{
// Path: core/src/main/java/com/threerings/nexus/io/Serializer.java
// public interface Serializer
// {
//     /** Returns the class assigned the supplied code.
//      * @throws NexusException if no class is registered for the supplied code. */
//     Class<?> getClass (short code);
// 
//     /** Returns the streamer for the class assigned the supplied code.
//      * @throws NexusException if no streamer is registered for the supplied code.  */
//     Streamer<?> getStreamer (short code);
// 
//     /** Returns the service factory for the class assigned the supplied code.
//      * @throws NexusException if no service is registered for the supplied code.  */
//     DService.Factory<?> getServiceFactory (short code);
// 
//     /** Returns the code assigned to the supplied class.
//      * @throws NexusException if the class in question is not registered. */
//     short getCode (Class<?> clazz);
// 
//     /** Returns the code assigned to the supplied service class.
//      * @throws NexusException if the class in question is not registered. */
//     short getServiceCode (Class<? extends NexusService> clazz);
// 
//     /** Writes the class code for the supplied value, and returns the streamer for same.
//      * @throws NexusException if the class for the value in question is not registered. */
//     <T> Streamer<T> writeStreamer (Streamable.Output out, T value);
// }


// Path: gwt-server/src/main/java/com/threerings/nexus/server/GWTIOJettyServlet.java
import org.eclipse.jetty.websocket.api.UpgradeRequest;
import org.eclipse.jetty.websocket.api.UpgradeResponse;
import org.eclipse.jetty.websocket.servlet.WebSocketCreator;
import org.eclipse.jetty.websocket.servlet.WebSocketServlet;
import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
import com.threerings.nexus.io.Serializer;

//
// Nexus GWTServer - server-side support for Nexus GWT/WebSockets services
// http://github.com/threerings/nexus/blob/master/LICENSE

package com.threerings.nexus.server;



/**
 * Wires our GWT/IO into Jetty WebSockets.
 */
public class GWTIOJettyServlet extends WebSocketServlet
{
    public GWTIOJettyServlet (SessionManager smgr, Serializer szer) {