Commit Graph

48 Commits

Author SHA1 Message Date
Adam
82d277a8a5 cache: split cache client and server into their own projects
Split handshake and update protocol also into their own projects
2017-12-28 21:15:01 -05:00
Tomas Slusny
4660bb3739 Fix OkHttp connection leaks on connection error
When request fails, entire response needs to be wrapped in try with
resources in order to close the connection properly and not only
response body.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2017-12-22 02:05:28 +01:00
Adam
033cf3bb01 cache: split loading archive files from archive loading
Also no longer store archive contents in memory and instead read it from
storage on demand.
2017-12-17 18:36:05 -05:00
Adam
7b66528694 cache dao: fix findMostRecent() to sort by revision properly 2017-11-10 11:28:39 -05:00
Unknown
09f7cebedb http-service: Fix capturing the whole of dot-delimited keys 2017-10-15 00:04:33 +02:00
Adam
3414e27bd6 account service: use common gson 2017-09-28 22:59:49 -04:00
Adam
58b34d0fc0 xtea: validate submitted keys and make them not unique per revision 2017-09-28 19:28:42 -04:00
Adam
f1bc016cf9 cache: use the most recent cache instead of the archive with the highest revision, which isn't always reliable 2017-09-28 19:22:56 -04:00
Adam
16aff43607 http-service: disable csrf protection which got enabled from the cache security manager 2017-09-28 19:22:08 -04:00
Adam
7ce893af7b cache: store index and archive crcs, and check them for updates too
Switch archive storage to CAS as sometimes archives change content without changing revision
2017-09-24 15:44:16 -04:00
Adam
714547e1bf cachedao: use prepared statement for finding files in archive 2017-09-21 18:00:21 -04:00
Adam
76b2d36704 cache: netty-ize client and server 2017-09-17 13:34:54 -04:00
Julian Nowaczek
b12bd04764 Hiscore feature expansion (#152)
* Add remaining Hiscore parameters to HiscoreSkill

* Add remaining Hiscore parameters to HiscoreResult

* Add remaining Hiscore parameters to HiscoreResultBuilder

* Add new Hiscore panel icons (from offical Hiscore website, so they don't match very well) and subpanel for Clue Scrolls, Bounty Hunter - Hunter, Bounty Hunter - Rogue, and Last Man Standing

* Add logic to catch unranked hiscores and display them properly. Not currently checking for combat level calculations, but other cases should be covered.

* Make HiscoreService and HiscoreClient aware of different hiscore endpoints

* Add Spring Editor to convert path variable String to enum, add pretty versions of HiscoreEndpoint names, add new icons for endpoint selection

* Fix HiscoreEndpoint.valueof failing silently and preventing lookup, update HiscoreService tests, add Hiscore endpoint selection buttons to HiscorePanel

* Replace HiscorePanel skill icons with smaller versions from the official hiscore website

* Fix details listing rank instead of experience

* Fix details listing rank instead of experience, fix skill panels not being cleared when selecting a different hiscore category, make HiscoreService respond 404  when a Hiscore entry is not found instead of 500.

* Fix skill panels not being cleared when selecting a different hiscore category, make HiscoreService respond 404  when a Hiscore entry is not found instead of 500.

* Revert changing RuneliteAPI base URL, those changes should not have been committed (local testing only)

* Add ClueScrollAll and ClueScrollMaster to HiscoreService tests.

* Style cleanup and relocate NotFoundException to http-service package

* Use relative path for small skill icons

* Move Jagex Hiscore urls from HiscoreService to HiscoreEndpoint

* Create new util package in http-service for common exceptions and Spring converters, clean up HiscoreService by streamlining error handling and removing methods for old unit test

* Change HiscoreService unit test to use new HiscoreTestService subclass which handles setting the test URL

* Change HiscoreEndpoint hiscoreUrls to HttpUrl instead of String

* Cleanup formatting, remove unused http-service exception

* http-api: cleanup HiscoreEndpoint
2017-09-16 16:41:11 -04:00
Adam
744f912d1a http-service: update cache storage 2017-09-11 17:08:43 -04:00
Adam
94530bda30 http-service: add cache service 2017-09-11 16:25:25 -04:00
Adam
a005ad0924 http-service: use gson for serialization, pretty print 2017-09-11 16:25:25 -04:00
Adam
2cc0eb4766 http-service: use spring externalized configuration for oauth id/secret 2017-09-10 13:20:54 -04:00
Adam
68c9172af2 http-service: fix /account/callback 2017-08-14 07:55:59 -04:00
Adam
b6a7108ca5 http-service: switch to spring-web from sparkjava/guice 2017-08-10 17:56:03 -04:00
Adam
8b5f22106e http-service: add single skill hiscore lookup 2017-07-21 18:15:10 -04:00
Adam
d1bbc52bb4 Remove unused imports 2017-07-16 10:11:08 -04:00
Adam
9734ded390 http-service: add item search 2017-07-14 18:34:34 -04:00
Adam
24a6291145 http-service: add examine service 2017-07-08 12:37:39 -04:00
Adam
c690d11840 http-service: set response status to 501 if an exception is encountered 2017-07-08 12:33:47 -04:00
Adam
a67fb38d27 http-service: add item price api 2017-06-13 18:20:24 -04:00
Adam
cae29ff754 http-service: set content-type to application/json in various responses 2017-06-12 19:11:15 -04:00
Adam
2c6a19c434 http-service: add item api 2017-06-12 18:35:21 -04:00
Adam
f92da7b9b1 http-service: add session check call to check session validity 2017-05-20 11:37:49 -04:00
Adam
45640a34be http-service: add config service 2017-05-16 16:24:50 -04:00
Adam
08fa07cf06 http-service: use open() not beginTransaction() in accountservice init 2017-05-15 20:46:04 -04:00
Adam
5250c4f1c3 http-service: remove old servicerunner test - does not anymore due to guice+JNDI 2017-05-15 20:45:47 -04:00
Adam
1171aed331 http-service: add ServletContextLogger.LEVEL context-param 2017-05-15 20:45:16 -04:00
Adam
38823d1afa http-api: share a common http client 2017-05-15 19:07:56 -04:00
Adam
cf4e9fab1d Add account plugin, and support for acquiring a session with the account webservice 2017-05-14 19:23:44 -04:00
Adam
4769728aca Add websocket server and client, for use later 2017-05-08 19:29:00 -04:00
Adam
872d22e524 http-service: use own servlet for proxying requests to spark
This allows using websockets more easily later

Also exclude spark dependency on jetty during non tests since we don't use it
2017-05-08 18:27:56 -04:00
Adam
d39953a232 http service: fix not setting AI on user id 2017-05-06 11:40:22 -04:00
Adam
7bac276e25 http-service: add account api 2017-05-05 23:11:47 -04:00
Adam
b0135776f8 http service: close response body 2017-05-02 08:12:12 -04:00
Adam
1ffb146474 http api/service: switch to okhttp
okhttp has websocket support and http/2 support
2017-05-01 19:30:56 -04:00
Adam
ea9e17a472 http-service: fix test. irritatingly can't make slf4j-simple the only slf4j implementation during tests 2017-04-20 15:02:31 -04:00
Adam
7c9560cbcf http service: log to application log 2017-04-20 13:02:34 -04:00
Adam
19daaae739 http-service: use guice for dependency injection 2017-04-20 12:23:13 -04:00
Adam
913e430047 Add update-check http api call to see if client is outdated 2017-04-19 20:40:36 -04:00
Adam
db7737906f http service: fix test 2017-04-14 20:15:50 -04:00
Adam
93588bda35 http service: add xtea service for storing xtea keys 2017-04-14 19:41:31 -04:00
Adam
ac0dda1f63 http service: add worlds api 2017-02-28 12:30:54 -05:00
Adam
32f0736d1f Initial work on web api, with a basic hiscore api 2017-02-12 15:01:09 -05:00