Commit b55efba5 authored by acq1305's avatar acq1305
Browse files

creando un servicio

parent ed882693
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bo.gob.softwarelibre.firmadorestatal.vista; package bo.gob.softwarelibre.firmadorestatal.vista;
import bo.gob.softwarelibre.firmadorestatal.servidor.ServidorRest; import bo.gob.softwarelibre.firmadorestatal.servidor.ServidorRest;
...@@ -15,24 +10,29 @@ import java.util.Properties; ...@@ -15,24 +10,29 @@ import java.util.Properties;
import sun.security.pkcs11.wrapper.PKCS11Exception; import sun.security.pkcs11.wrapper.PKCS11Exception;
/** /**
* Run Clase que contiene el main para convertir la aplicación en un demonio
* (servicio)
*
* @author: Angel Céspedes Quiroz
* @Skype: acq1305
* @Linkedin: https://bo.linkedin.com/in/acq1305
* *
* @author acq1305
*/ */
public class Run { public class Run {
/** /**
* Main para iniciar el servidor REST como demonio * Main para iniciar el servidor REST como demonio
* *
* @param args * @param args
* @throws IOException * @throws IOException
* @throws PKCS11Exception * @throws PKCS11Exception
*/ */
public static void main(String[] args) throws IOException, PKCS11Exception { public static void main(String[] args) throws IOException, PKCS11Exception {
try { try {
GestorSlot gestorSlot; GestorSlot gestorSlot;
gestorSlot = GestorSlot.getInstance(); gestorSlot = GestorSlot.getInstance();
gestorSlot.adicionarProveedor(proveedores(new File("token.cfg").getAbsolutePath ())); gestorSlot.adicionarProveedor(proveedores(new File("token.cfg").getAbsolutePath()));
ServidorRest rest = new ServidorRest(); ServidorRest rest = new ServidorRest();
rest.iniciar(); rest.iniciar();
} catch (Exception e) { } catch (Exception e) {
System.out.println(e.getMessage()); System.out.println(e.getMessage());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment