This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ANDROID_NOTIFICATION is in the format DEVICE_ID/NOTIFICATION_ID/EVENT_TYPE/EVENT_CONTENTS | |
NOTIFICATION_TYPE="`echo $ANDROID_NOTIFICATION | sed 's/.*\/.*\/\(.*\)\/.*/\1/'`" | |
NOTIFICATION_DATA="`echo $ANDROID_NOTIFICATION | sed 's/.*\///'`" | |
if [ "x$NOTIFICATION_TYPE" == "xRING" ]; then | |
TEXT_TO_SAY="Call from" | |
elif [ "x$NOTIFICATION_TYPE" == "xSMS" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>com.typesafe.akka</groupId> | |
<artifactId>akka-actor_2.10</artifactId> | |
<version>2.2.3</version> | |
</dependency> | |
<dependency> | |
<groupId>com.typesafe.akka</groupId> | |
<artifactId>akka-testkit_2.10</artifactId> | |
<version>2.2.3</version> | |
<scope>test</scope> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.assuredlabor.services.concurrent; | |
import lombok.Setter; | |
import scala.concurrent.ExecutionContext; | |
@Setter | |
public abstract class AbstractFutureFactory<T> implements FutureFactory<T> { | |
protected ExecutionContext executionContext; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Setter | |
public class AddressGeocodingFutureFactory extends AbstractFutureFactory<Address> { | |
private GeocodingService geocoder; | |
@Override | |
public Future<Address> makeFuture(final Address address) { | |
return Futures.future(new Callable<Address>() { | |
public Profile call() throws Exception { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FutureFactoryTestBase { | |
protected ExecutionContext ec; | |
@Before | |
public void setup() { | |
Config config = ConfigFactory.load(); | |
ActorSystem system = ActorSystem.create("test", config); | |
ec = system.dispatchers().lookup("akka.test.calling-thread-dispatcher"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AddressGeocodingFutureFactoryTest extends FutureFactoryTestBase { | |
@Test | |
public void testFuture() throws Exception { | |
GeocodingService geocodingService = mock(GeocodingService.class); | |
GeocodingFutureFactory gff = new GeocodingFutureFactory(); | |
gff.setExecutionContext(ec); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class FutureFactoryConfiguration { | |
ActorSystem system = ActorSystem.create(); | |
@Resource(name="geocodingService") | |
private GeocodingService geocodingService; | |
@Bean(name="executionContext") | |
public ExecutionContext getExecutionContext() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package xml; | |
import java.io.OutputStream; | |
import java.io.Writer; | |
import javax.xml.stream.*; | |
import javax.xml.transform.Result; | |
import com.fasterxml.aalto.stax.OutputFactoryImpl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using manifest file /Users/me/src/my/app/manifest.yml Updating app my-app in org MyCompany / space staging as [email protected]... OK Uploading my-app... Uploading app files from: /Users/me/src/my/app Uploading 30.7M, 11564 files 15.3M uploaded... 22.6M uploaded... Done uploading OK Stopping app my-app in org MyCompany / space staging as [email protected]... OK Starting app my-app in org MyCompany / space staging as [email protected]... -----> Downloaded app package (14M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-17 20:41:46,993 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-17 20:41:46,993 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': 'en_US.UTF-8', 'MEMORY_LIMIT': '256m', 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-app', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-41a0-8caa-4da27ed50536', u'application_uris': [u'my-app.cfapps.io'], u'version': u'cb12947a-9fb7-4647-b |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using manifest file /Users/jpollak/src/my/mobileweb/manifest.yml Updating app my-mobileweb in org mycompany / space staging as [email protected]... OK Uploading my-mobileweb... Uploading app files from: /Users/jpollak/src/my/mobileweb Uploading 30.8M, 11565 files 15.3M uploaded... 29.3M uploaded... Done uploading OK Stopping app my-mobileweb in org mycompany / space staging as [email protected]... OK Starting app my-mobileweb in org mycompany / space staging as [email protected]... -----> Downloaded app package (14M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-17 20:59:29,348 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-17 20:59:29,349 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': 'en_US.UTF-8', 'MEMORY_LIMIT': '256m', 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-mobileweb', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-41a0-8caa-4da27ed50536', u'application_uris': [u'my |
OlderNewer