Skip to content

Instantly share code, notes, and snippets.

View lholmquist's full-sized avatar

Lucas Holmquist lholmquist

View GitHub Profile
//creating a stompws noftifier, is we add the channels here, there is a connection error
notifierStomp = AeroGear.Notifier({
name: "stompClient",
type: "stompws",
settings: {
connectURL: "ws://localhost:61614/stomp",
channels: [ stompChannel ]
}
});
@Produces
public CorsConfiguration demoConfig() {
    return CorsConfig.enableCorsSupport()
            .anyOrigin()
            .enableCookies()
            .maxAge(20)
            .enableAllRequestMethods()
            .validRequestHeaders("accept, content-type");

}

@lholmquist
lholmquist / idb.md
Last active December 16, 2015 21:21

indexedDB Thoughts

current DataManager api

create a new datamanager with a default memory adapter

var dm = AeroGear.DataManager( "simple" );
completed: true
created_at: "2013-05-01T19:52:48Z"
description: null
duration: 1
ended_at: "2013-05-01T20:30:09Z"
high_bid: Object
    amount: 18
    auction_id: 5
    committed: true

created_at: "2013-05-01T20:30:03Z"

###assuming you are in the base directory

cp -rf target/ag-push JBOSS_HOME/standalone/deployments/ag-push.war

do this only if you have a server side change or the first time you deploy

touch JBOSS_HOME/standalone/deployments/ag-push.war.dodeploy

INFO | New I/O worker #4 | ID-lincolnhawk-home-49880-1365533783487-0-3 >>> (user-registration) from(vertx://demo.user-registration) --> stomp://queue:/user-registration <<< Pattern:InOnly, Headers:{breadcrumbId=ID-lincolnhawk-home-49880-1365533783487-0-4}, BodyType:org.vertx.java.core.buffer.Buffer, Body:{"platform":"gplus","identifier":"106194804223969570536","profile_pic_url":"https://lh6.googleusercontent.com/-DyAOK5CbWJU/AAAAAAAAAAI/AAAAAAAAAhY/GclqjWxj0-g/photo.jpg","name":"Lucas Holmquist","email":"lucas.holmquist@gmail.com"}
WARN | New I/O worker #4 | Cannot determine specific JmsMessage type to use from body class. Will use generic JmsMessage. Body class: org.vertx.java.core.buffer.Buffer. If you want to send a POJO then your class might need to implement java.io.Serializable, or you can force a specific type by setting the jmsMessageType option on the JMS endpoint.
INFO | New I/O worker #4 | ID-lincolnhawk-home-49880-1365533783487-0-3 >>> (user-registration) from(vertx://demo.user-registration)
@lholmquist
lholmquist / ncd.md
Created April 9, 2013 17:44
notifier connect/disconnect

HMM

//create a basic notifier with some settings

AeroGear.Notifier({
name: "notifications",
settings: {
    connectURL:  "/eventbus",
    autoConnect: true,

onConnect: function() {

 //Auth enroll
 
 if ( options.contentType ) {
        extraOptions.contentType = options.contentType;
    } else if ( agAuth ) {
        extraOptions.contentType = "application/json";
    }
    if ( options.dataType ) {
        extraOptions.dataType = options.dataType;

} else if ( agAuth ) {

@lholmquist
lholmquist / js_github_paging.md
Last active December 12, 2015 00:28
js github paging

I was trying out the js paging stuff with github and i noticed something that i think is a bug.

Here is the pipeline/pipe setup

var pipeline = AeroGear.Pipeline(
    {
        name: "githubcommits",
        settings: {

baseURL: "https://api.github.com/repos/lholmquist/aerogear-js/",

Custom Aerogear.js Builder

Prototype here: http://aerogearjsbuilder-lholmqui.rhcloud.com/

myrepo: git@github.com:lholmquist/aerogearjsbuilder.git

There is still a couple of minor tweaks that i need, like better error handling and CORS support possible. although it uses an iframe, so maybe not

This is the way it works.