diff --git a/src/main/java/com/ntlab/irisserver/models/RoomManager.java b/src/main/java/com/ntlab/irisserver/models/RoomManager.java index 090767d..0ad8cf7 100644 --- a/src/main/java/com/ntlab/irisserver/models/RoomManager.java +++ b/src/main/java/com/ntlab/irisserver/models/RoomManager.java @@ -8,12 +8,10 @@ import java.util.UUID; @Component -@Path("/rooms") public class RoomManager { private static RoomManager theInstance = null; private Map rooms = new HashMap(); - @GET public static RoomManager getInstance(){ if(theInstance == null){ theInstance = new RoomManager(); @@ -21,8 +19,7 @@ return theInstance; } - @PUT - public Room createRoom(@FormParam("nickname") String owner){ + public Room createRoom(String owner){ UUID uuid = UUID.randomUUID(); String rid = uuid.toString(); //uuid型からstring型に変換 Room r = new Room(rid, owner); @@ -30,14 +27,12 @@ return r; } - @GET - public Room getRoom(@FormParam("rid") String rid){ + public Room getRoom(String rid){ Room r = rooms.get(rid); return r; } - @DELETE - public void deleteRoom(@FormParam("rid") String rid){ + public void deleteRoom(String rid){ rooms.remove(rid); }