Chat applikasjon
Public Member Functions | List of all members
resources.MessageResource Class Reference

Public Member Functions

List< MessagegetMessages (@PathParam("userId1") int userId1, @PathParam("userId2") int userId2)
 
Message newMessage (Message message)
 

Detailed Description

Message resource exposed at "/message" path

Member Function Documentation

◆ getMessages()

List<Message> resources.MessageResource.getMessages ( @PathParam("userId1") int  userId1,
@PathParam("userId2") int  userId2 
)
inline

Method handling HTTP GET requests. The returned object will be sent to the client as a JSON object.

Parameters
userId1describes first user of the messages
userId2describes second user of the messages
Returns
list of messages as JSON object

◆ newMessage()

Message resources.MessageResource.newMessage ( Message  message)
inline

Method handling HTTP POST requests.

Parameters
messagethe Message to be saved in database
Returns
the Message object as JSON response

The documentation for this class was generated from the following file: