All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.esec.icpm.libs.signature.response.notify.NotifyService Maven / Gradle / Ivy

Go to download

This library is used to make integration with Certillion server, so our Clients can easily ask for signatures or generate certificates.

There is a newer version: 1.2.0
Show newest version
package br.com.esec.icpm.libs.signature.response.notify;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;

import br.com.esec.icpm.libs.Server;
import br.com.esec.icpm.libs.signature.response.Futures;
import br.com.esec.icpm.mss.ws.notification.BatchSignatureNotificationType;
import br.com.esec.icpm.mss.ws.notification.SignatureNotificationType;

public class NotifyService {
	
	private static Logger log = LoggerFactory.getLogger(NotifyService.class);

	private static NotifyService instance;
	
	public static NotifyService getInstance() {
		if (instance == null)
			instance = new NotifyService();
		return instance;
	}

	public ListenableFuture simple(Server server, long transactionId) {
		SettableFuture future = SettableFuture.create();
		
		Futures.put(server, transactionId, future);
		
		log.info("Waiting simple signature notification of transaction " + transactionId + "...");
		
		return future;
	}

	public ListenableFuture batch(Server server, long transactionId) {
		SettableFuture future = SettableFuture.create();
		
		Futures.put(server, transactionId, future);
		
		log.info("Waiting batch signature notification of transaction " + transactionId + "...");
		
		return future;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy