Skip to content

Instantly share code, notes, and snippets.

View secondsun's full-sized avatar
🎩
Happy Saturday!

Hoyt Summers Pittman secondsun

🎩
Happy Saturday!
View GitHub Profile
#!/bin/bash
#
# Derived from -
# Joshua Davis
# http://shrubbery.mynetgear.net/c/display/W/Java+Daemon+Startup+Script
#
# This is a modification of the original script (which lets you run a java program as a deamon.
# look bellow for more information) that lets you run a groovy script as a deamon.
#
# ============== OLD SCRIPT TEXT ==============

AbstractPageRequestHandler.java

abstact class AbstractPageRequestHandler() {
    public List<Pair<String, String>>  getPagingHeaders(ReadFilter filter){
       List<Pair<String, String>> toReturn = new ArrayList<>();
       return toReturn;
    }
    
    public byte[] appendToBody(ReadFilter filter, byte[] body){
 return body;

Below is a comparison of the method usage proposed by each lib for handling paged resources.

Read Next Page

Android

ReadFilter filter = new ReadFilter();
filter.setLimit(5);
@secondsun
secondsun / gist:4078711
Created November 15, 2012 13:40 — forked from mstruk/gist:4074544
PipeConfig Ergonomics

Currently, when creating a new PipeConfig we use a constructor and specify a rootUrl:

    URL rootUrl = new URL("http://todo-aerogear.rhcloud.com/todo-server");

    Pipeline pipeline = new Pipeline(rootUrl);
    PipeConfig config = new PipeConfig(rootUrl, Project.class);

    Pipe<Project> projects = pipeline.pipe(Project.class, config);