Skip to content
This repository has been archived by the owner on Nov 18, 2018. It is now read-only.

aerogear-attic/unifiedpush-forge-addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation Notice

This repository has been deprecated and is not being maintained. If you have any questions, please get in touch with the collaborators.

Forge Addon for UnifiedPush Server

This addon provides standalone functionality. The UnifiedPush Addon provides functionality to connect your application with an UnifiedPush Server instance.

Project Info

License:

Apache License, Version 2.0

Build:

Maven

Documentation:

https://aerogear.org/push/

Issue tracker:

https://issues.jboss.org/browse/AGPUSH

Mailing lists:

aerogear-users (subscribe)

aerogear-dev (subscribe)

Dependencies:

Depends on

Addon Exported Optional

templates

no

no

resource

no

no

Setup

This Addon requires the following installation steps.

Add configuration to pom.xml

To use this addon, you must add it as a dependency in the pom.xml of your forge-addon classified artifact: (Make sure the dependency is put all the way to the left, and uses 3 spaces for indentation of GAV)

<dependency>
   <groupId>org.jboss.aerogear</groupId>
   <artifactId>unifiedpush</artifactId>
   <classifier>forge-addon</classifier>
   <version>${version}</version>
</dependency>

Features

This addon helps to integrate the UnifiedPush Java Sender into your application. Start by calling the setup command :

unifiedpush-setup --serverURL http://myserver.com --pushApplicationId 123456789 --masterSecret mypassword

You can also omit the the parameters, you will then be prompted for each property.

After that, you can generate a service that will wrap the Java Sender

unifiedpush-generate-service

From there you can use this service wherever you want:

@Inject
private SenderService senderService;

@POST
@Consumes("application/json")
public Response create(Message entity) {
  em.persist(entity);
  UnifiedMessage message = UnifiedMessage.withMessage().alert(entity.getContent()).build();
  senderService.send(message);
  return Response.Ok().build();
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •