REST, Web Sockets, Server-sent Events

7,547 views

Published on

REST
Web Sockets
Server-sent Events

This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.

http://www.ivanomalavolta.com

Published in: Technology
1 Comment
10 Likes
Statistics
Notes
No Downloads
Views
Total views
7,547
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
136
Comments
1
Likes
10
Embeds 0
No embeds

No notes for slide

REST, Web Sockets, Server-sent Events

  1. 1. •••
  2. 2.
  3. 3. ••https://jersey.dev.java.net
  4. 4. ••https://jersey.dev.java.net
  5. 5. @Path
  6. 6. InputStream
  7. 7. @Consumes @PathParam
  8. 8. @pathParam
  9. 9. @PathParamid
  10. 10. @Consumes@POST @PUT
  11. 11. @Produces@GET @POST@PUT
  12. 12. • @FormParams–POST PUT• @HEAD–• @CookieParam–• @HeaderParam–•
  13. 13. ••••–•
  14. 14. ••––•
  15. 15. open event streameventeventServereventeventeventevent<EventSource>onmessageonmessageonmessageBrowserhttp://slidesha.re/LeNohX
  16. 16. ••
  17. 17. •––•– ws://– wss://
  18. 18. http://www.w3.org/TR/2009/WD-websockets-20091222/
  19. 19. •••••••••
  20. 20. 
  21. 21. var source = new EventSource(“http://some.url”);var handler = function(event){console.log(event.data);console.log(event.id);console.log(event.origin);console.log(event.lastEventId);}source.addEventListener(‘myEvent, handler, false);
  22. 22.
  23. 23. <fieldName>: <fieldValue>n
  24. 24. fieldName•–•–•–•–
  25. 25. ••••

×