
br.com.esec.icpm.libs.signature.response.notify.NotifyService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of certillion-client-library Show documentation
Show all versions of certillion-client-library Show documentation
This library is used to make integration with Certillion server, so our Clients can easily ask for signatures or generate certificates.
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