public Response newRequest(Request request)  {
		
		switch(request.type) {
		
		case SETUP:
			if(state != State.INIT)
				return new Response(455, request.seq, session);
			try {
				video = new VideoStream(
						Main.webroot + File.separator + request.url);
				state = State.READY;
			} catch(FileNotFoundException e) {
				return new Response(404, request.seq, session);
			}
			return new Response(200, request.seq, session);
			
			
		case PLAY:
			if(state != State.READY)
				return new Response(455, request.seq, session);
			timer.start();
			state = State.PLAYING;
			return new Response(200, request.seq, request.session);
			

		case PAUSE:
			if(state != State.PLAYING)
				return new Response(455, request.seq, session);
			timer.stop();
			state = State.READY;
			return new Response(200, request.seq, session);
			
			
		case TEARDOWN:
			timer.stop();
			state = State.INIT;
			return new Response(200, request.seq, session);
			
			
		default:
			// bad things
			return new Response(500, request.seq, session);
		}
	}