Package cz.cvut.fel.restauracefel.library.service

Examples of cz.cvut.fel.restauracefel.library.service.ConfigParser


        if (System.getSecurityManager() == null) {
            System.setSecurityManager(new RMISecurityManager());
        }

        String name = "ServiceFacadeSmeny";
        ConfigParser config = new ConfigParser();
        InetAddress inetAddress = InetAddress.getByName(config.getServerIP());
        //Stub
        IServiceFacadeSmeny facade = ServiceFacadeSmeny.getInstance();
        //reg.rebind(name, facade); //TODO - IServiceFacadeSmeny must extned Remote
        System.out.println("Servisni fasada pro modul SMENY zaregistrovana pod jmenem \"ServiceFacadeSmeny\"");
        System.out.println("Pripojeni pres adresu:" + inetAddress.toString() + "\n\n");
View Full Code Here


     * @throws java.io.FileNotFoundException
     * @throws java.rmi.NotBoundException
     */
    public static IServiceFacadeSmeny XXXgetInstance() throws RemoteException, FileNotFoundException, NotBoundException {
        if (facade == null) {
            ConfigParser config = null;
            config = new ConfigParser();
            if (System.getSecurityManager() == null) {
                System.setSecurityManager(new RMISecurityManager());
            }
            String name = "ServiceFacadeWorkshift";//TODO implementova ServiceFacade pro workshift
            facade = null;
            Registry reg = null;
            try {
                reg = LocateRegistry.getRegistry(config.getPrimaryServerIP(), 1099);
                String ip = config.getPrimaryServerIP();
                String[] list = reg.list();
                facade = (IServiceFacadeSmeny) reg.lookup(name);
            } catch (Exception e) {
                try {
                    reg = LocateRegistry.getRegistry(config.getSecondaryServerIP(), 1099);
                    facade = (IServiceFacadeSmeny) reg.lookup(name);
                } catch (Exception ex) {
                    facade = null;
                    throw new RemoteException();
                }
View Full Code Here

        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        int y = (int) ((dim.getHeight() - 350) / 2);
        int x = (int) ((dim.getWidth() - 400) / 2);
        setBounds(x, y, 400, 350);
        initComponents();
        config = new ConfigParser();
        jTextFieldFilePath.setText(config.getAbsoluteConfigFilePath());
        readSettings();
    }
View Full Code Here

TOP

Related Classes of cz.cvut.fel.restauracefel.library.service.ConfigParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.