Skip to content

Commit bec0700

Browse files
committed
Added to the repository.
1 parent 5ff7ee7 commit bec0700

56 files changed

Lines changed: 3172 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apply plugin: 'com.android.application'
2+
3+
repositories {
4+
mavenCentral()
5+
maven {
6+
url "http://artifactory.kaazing.wan/artifactory/libs-releases-local"
7+
}
8+
}
9+
10+
android {
11+
compileSdkVersion 19
12+
buildToolsVersion "23.0.2"
13+
14+
defaultConfig {
15+
applicationId "com.kaazing.gateway.jms.client.demo"
16+
minSdkVersion 19
17+
targetSdkVersion 19
18+
multiDexEnabled true
19+
}
20+
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
25+
}
26+
}
27+
}
28+
29+
dependencies {
30+
compile group: 'com.kaazing', name: 'enterprise.android.client.all', version: '4.1.0-RC006'
31+
compile 'org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1'
32+
compile 'com.google.android:support-v4:r7'
33+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.kaazing.gateway.jms.client.demo" android:versionCode="1" android:versionName="4.0">
4+
<application android:icon="@drawable/icon" android:label="@string/app_name_short">
5+
<activity android:name=".JMSDemoActivity" android:configChanges="orientation" android:windowSoftInputMode="stateHidden">
6+
<intent-filter>
7+
<action android:name="android.intent.action.MAIN" />
8+
<category android:name="android.intent.category.LAUNCHER" />
9+
</intent-filter>
10+
</activity>
11+
</application>
12+
<uses-permission android:name="android.permission.INTERNET"/>
13+
</manifest>
14+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright (c) 2007-2015, Kaazing Corporation. All rights reserved.
3+
*/
4+
5+
package com.kaazing.gateway.jms.client.demo;
6+
7+
import android.os.Handler;
8+
import android.os.HandlerThread;
9+
10+
/**
11+
* The class is used to add Runnable in a queue and the runnable added to the queue
12+
* will be run in a first in first out basis. This class is useful to run a series of tasks
13+
* sequentially in a separate thread from the main thread.
14+
*
15+
*/
16+
public class DispatchQueue extends HandlerThread {
17+
18+
private Handler handler;
19+
20+
public DispatchQueue(String name) {
21+
super(name);
22+
}
23+
24+
/**
25+
* The message blocks until the thread is started. This should be called
26+
* after call to start() to ensure the thread is ready.
27+
*/
28+
public void waitUntilReady() {
29+
handler = new Handler(getLooper());
30+
}
31+
32+
/**
33+
* Adds the Runnable to the message queue which will be run on the thread.
34+
* The runnable will be run in a first in first out basis.
35+
*/
36+
public void dispatchAsync(Runnable task) {
37+
handler.post(task);
38+
}
39+
40+
public void removePendingJobs() {
41+
handler.removeCallbacksAndMessages(null);
42+
}
43+
44+
}

0 commit comments

Comments
 (0)