@DELETE
 @Path("/{messageId}")
 public void deleteMessage(@PathParam("messageId") Long messageId) {
   messageService.removeMessage(messageId);
 }
 @PUT
 @Path("/{messageId}")
 public Message updateMessage(@PathParam("messageId") Long messageId, Message message) {
   message.setId(messageId);
   return messageService.updateMessage(message);
 }
 @GET
 @Path("/{messageId}")
 public Message getMessage(@PathParam("messageId") Long messageId) {
   return messageService.getMessage(messageId);
 }
 @POST
 public Message addMessage(Message message) {
   return messageService.addMessage(message);
 }
 @GET
 public List<Message> getMessages() {
   return messageService.getAllMessages();
 }