GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vokter/vokter-client-java: Sample Jetty/Jersey2 server that interoperates with a running Vokter server (https://github.com/vokter/vokter).

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Vokter Client in Jersey2

This is an example client in Jersey2 that interoperates with Vokter using REST calls. It implements three simple REST methods, a mandatory POST ("/rest/notification") that receives Vokter detected differences for watched pages, and two optional GETs that allow the user to interact with Vokter using the browser's address bar. Notifications are simply printed on the console when received.

  • Getting Started
    • Installation
      • Running with Apache Tomcat
      • Running with Jetty
    • Usage
      • Subscribe
      • Cancel
  • License

Getting Started

Installation

If you already have a running Vokter server, skip to step 5.

  1. Download and install MongoDB

  2. Run MongoDB with mongod

  3. Download the latest release of Vokter core server

  4. Run Vokter server with java -jar vokter-core.jar (more information on running and using the core service)

  5. Download the latest war of this Java client

    Running with Apache Tomcat

    1. Download and install Apache Tomcat
    2. Place the downloaded war file in tomcat-folder/webapps
    3. Run Tomcat with tomcat-folder/bin/startup.sh

    Running with Jetty

    1. Download and install Jetty
    2. Place the downloaded war file in jetty-folder/webapps
    3. Run Jetty with java -jar jetty-folder/start.jar

Note that if you change the default host of the deployed web app container or of the deployed Vokter server, you will need to change the first few Strings in the ClientResource.java file and pack a new war.

Usage

Subscribe

Load the URL below on your browser or curl, replacing ENCODED_URL with an encoded URL and KEYWORDS with an encoded string including a keyword. You can use 'keywords' query parameter multiple times to add more keywords.

http://localhost:8080/rest/watch?url=ENCODED_URL&keywords=KEYWORDS

For example, the following URL will subscribe the client to receive notifications when changes to the words 'argus' and 'panoptes' are found in the URL bbc.com:

http://localhost:8080/rest/watch?url=http%3A%2F%2Fbbc.com&keywords=argus&keywords=panoptes

Cancel

Load the URL below on your browser or curl, replacing ENCODED_URL with an encoded URL:

http://localhost:8080/rest/cancel?url=ENCODED_URL

For example, the following URL will cancel the watch job launched by this client for the URL bbc.com:

http://localhost:8080/rest/cancel?url=http%3A%2F%2Fbbc.com

License

Copyright 2015 Eduardo Duarte

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Sample Jetty/Jersey2 server that interoperates with a running Vokter server (https://github.com/vokter/vokter).

Topics

bloom-filterdifferences-detecteddiffmatchpatchdropwizardjaccard-similarityjavajersey2jettylshminhashnotificationsquartzrestrest-apirestfulsimilaritytext-difftomcatwork-in-progress

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.