org.glassfish.jersey.examples.jersey_ejb.resources
Class MessageBoardResourceBean

java.lang.Object
  extended by 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 (pavel.bucek at oracle.com)

Constructor Summary
MessageBoardResourceBean()
           
 
Method Summary
 Response addMessage(String msg)
           
 void deleteMessage(int msgNum)
           
 Message getMessage(int msgNum)
           
 List<Message> getMessages()
          Returns a list of all messages stored in the internal message holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageBoardResourceBean

public MessageBoardResourceBean()
Method Detail

getMessages

public List<Message> getMessages()
Returns a list of all messages stored in the internal message holder.


addMessage

public Response addMessage(String msg)
                    throws URISyntaxException
Throws:
URISyntaxException

getMessage

@Path(value="{msgNum}")
public Message getMessage(int msgNum)

deleteMessage

@Path(value="{msgNum}")
public void deleteMessage(int msgNum)
                   throws CustomNotFoundException
Throws:
CustomNotFoundException


Copyright © 2007-2013 Oracle Corporation. All Rights Reserved. Use is subject to license terms.