Class MessageBoardResourceBean
- java.lang.Object
-
- org.glassfish.jersey.examples.jersey_ejb.resources.MessageBoardResourceBean
-
public class MessageBoardResourceBean extends Object
A stateless EJB bean to handle REST requests to the messages resource. Messages are stored in the injected EJB singleton instance.- Author:
- Pavel Bucek
-
-
Constructor Summary
Constructors Constructor Description MessageBoardResourceBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseaddMessage(String msg)voiddeleteMessage(int msgNum)MessagegetMessage(int msgNum)List<Message>getMessages()Returns a list of all messages stored in the internal message holder.
-
-
-
Method Detail
-
getMessages
@GET public List<Message> getMessages()
Returns a list of all messages stored in the internal message holder.
-
addMessage
@POST public Response addMessage(String msg) throws URISyntaxException
- Throws:
URISyntaxException
-
getMessage
@Path("{msgNum}") @GET public Message getMessage(@PathParam("msgNum") int msgNum)
-
deleteMessage
@Path("{msgNum}") @DELETE public void deleteMessage(@PathParam("msgNum") int msgNum) throws CustomNotFoundException
- Throws:
CustomNotFoundException
-
-