Skip to content

rohancs/HttpRestWebService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpRestWebService

##Instructions:

Set Cache Settings in ~\Cache\src\main\resources\cache.properties Sample properties file:

  cacheDuration=30000
  cacheSizeBytes=150000
  cacheSizeElements=10

Launching Cache Server:

Run "CacheServerMain.java" with following JVM options:

  -Dcom.sun.management.jmxremote.port=8009
  -Dcom.sun.management.jmxremote.authenticate=false
  -Dcom.sun.management.jmxremote.ssl=false

The Service should start on port:8009 (default).

Launching Http Rest Service:

Run "HttpClientMain.java" This launches a REST web service end point at port 8008

  NOTE: Optionally implement load method on "CacheServer.java" to load cache when there is a cache miss.

Test Cases:

Open Web Browser: Get value for key "foo"

  http://localhost:8008/Cache/get/foo

Put value "bar" for key "foo"

  http://localhost:8008/Cache/set/foo/bar

Get Cache Size

  http://localhost:8008/Cache/size

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages