Skip to content

Instantly share code, notes, and snippets.

View kborchers's full-sized avatar

Kris Borchers kborchers

  • GM Financial
  • Dallas, TX
  • 19:27 (UTC -05:00)
View GitHub Profile

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.

AG-Controller Pipe Setup

Android

iOS

var pipeline = AeroGear.Pipeline({
name:"capitals",
recordId: "name",
settings:{
baseURL:'/rs/'
}
});
var capitals = pipeline.pipes['capitals'];
@kborchers
kborchers / gist:3833435
Created October 4, 2012 13:11 — forked from matzew/gist:3832056
FAQ or Wiki or ...
  • What is a pipeline ?

A pipeline represents a set of n connections to a server. The pipeline class offers some simple 'management' APIs to work with containing 'pipe' objects. Basically it allows you to add or remove new connections to the pipeline.

  • What is a pipe ?

A pipe represents one connection to a server. The pipe API is basically an abstraction layer for any server side connection, which all allows you to simply 'read' from, or 'write' to a server connection. However, technical details like RESTful APIs (e.g. HTTP PUT or HTTT GET) are not exposed on the pipeline and pipe APIs. In the future you can have different type of pipe objects (-> connections). The default (and CURRENTLY only supported) type is a REST connection.

Below is an example from our JavaScript lib:

jQuery.noConflict();
(function($) {
$(function() {
setInterval( "slideSwitch()", 5000 );
});
})(jQuery);
// ==UserScript==
// @name GitHub - Show pull request numbers
// @match https://github.com/*/*/pulls
// @match https://github.com/*/*/pulls/*
// ==/UserScript==
[].slice.call( document.querySelectorAll( ".listings h3" ) ).forEach(function( elem ) {
var anchor = elem.getElementsByTagName( "a" )[ 0 ],
id = anchor.href.match( /(\d+)$/ )[ 0 ],
span = document.createElement( "span" ),
@kborchers
kborchers / LICENSE.txt
Created September 28, 2011 14:05 — forked from p01/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
<style> blockquote { border-left: none; color: inherit; } </style>

JQUERY FOUNDATION, INC.

SECOND AMENDED BYLAWS

EFFECTIVE AS OF: _____________, 2014