SNP4J

An api to send notification to Snarl

Лицензия

Лицензия

Группа

Группа

fr.jcgay.snp4j
Идентификатор

Идентификатор

snp4j
Последняя версия

Последняя версия

0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

SNP4J
An api to send notification to Snarl
Система контроля версий

Система контроля версий

https://github.com/jcgay/snp4j

Скачать snp4j

Имя Файла Размер
snp4j-0.3.pom
snp4j-0.3.jar 41 KB
snp4j-0.3-sources.jar 15 KB
snp4j-0.3-javadoc.jar 164 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/fr.jcgay.snp4j/snp4j/ -->
<dependency>
    <groupId>fr.jcgay.snp4j</groupId>
    <artifactId>snp4j</artifactId>
    <version>0.3</version>
</dependency>
// https://jarcasting.com/artifacts/fr.jcgay.snp4j/snp4j/
implementation 'fr.jcgay.snp4j:snp4j:0.3'
// https://jarcasting.com/artifacts/fr.jcgay.snp4j/snp4j/
implementation ("fr.jcgay.snp4j:snp4j:0.3")
'fr.jcgay.snp4j:snp4j:jar:0.3'
<dependency org="fr.jcgay.snp4j" name="snp4j" rev="0.3">
  <artifact name="snp4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.jcgay.snp4j', module='snp4j', version='0.3')
)
libraryDependencies += "fr.jcgay.snp4j" % "snp4j" % "0.3"
[fr.jcgay.snp4j/snp4j "0.3"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.12

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.16.6

test (4)

Идентификатор библиотеки Тип Версия
org.assertj : assertj-core jar 1.7.1
junit : junit jar 4.12
org.mockito : mockito-core jar 2.0.31-beta
ch.qos.logback : logback-classic jar 1.1.3

Модули Проекта

Данный проект не имеет модулей.

#SNP4J

A blocking implementation of the SNP protocol to talk with Snarl.

##Usage

  1. Create the destination,
  2. Define an application,
  3. Initialize the notifier,
  4. Create a notification,
  5. Send the notification,
  6. Release resources.
	Server destination = Server.builder()
                .withHost("localhost")
                .withPort(9887)
                .build();
	Application application = Application.of("application/x-vnd-apache.maven", "Maven");
	Notifier notifier = SnpNotifier.of(application, destination);
	
	Notification notification = new Notification();
	notification.setText("Hello World !");
	notification.setTitle("First notification");
	
	try {
    	notifier.send(notification);
    } finally {
        Closeables.closeQuietly(notifier);
    }

The application is automatically registered against Snarl, and unregistered when closing resource.

##Installation

Add dependency with your favorite build tool.

Example with Maven:

    <dependencies>
        <dependency>
            <groupId>com.github.jcgay.snp4j</groupId>
            <artifactId>snp4j</artifactId>
            <version>0.3</version>
        </dependency>
    </dependencies>

Build status

Build Status Coverage Status

Release

mvn -B release:prepare release:perform

Версии библиотеки

Версия
0.3
0.2