This repository has been deprecated and is not being maintained. If you have any questions, please get in touch with the collaborators.
This addon provides standalone functionality. The UnifiedPush Addon provides functionality to connect your application with an UnifiedPush Server instance.
License: |
Apache License, Version 2.0 |
Build: |
Maven |
Documentation: |
|
Issue tracker: |
|
Mailing lists: |
|
This Addon requires the following installation steps.
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>
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();
}