Search in sources :

Example 6 with ClientServerManager

use of cbit.vcell.client.server.ClientServerManager in project vcell by virtualcell.

the class ClientTester method mainInit.

/**
 * This method was created in VisualAge.
 * @return VCellConnection
 * @param args java.lang.String[]
 */
public static cbit.vcell.client.server.ClientServerManager mainInit(String[] args, String programName, Frame mainWindow) throws Exception {
    ClientServerInfo csInfo = null;
    if (args.length == 3) {
        if (args[0].equalsIgnoreCase("-local")) {
            csInfo = ClientServerInfo.createLocalServerInfo(args[1], new UserLoginInfo.DigestedPassword(args[2]));
        }
    } else if (args.length == 4) {
        csInfo = ClientServerInfo.createRemoteServerInfo(args[0], Integer.parseInt(args[1]), args[2], new UserLoginInfo.DigestedPassword(args[3]));
    } else {
        System.err.println("usage: " + programName + " -local userid password");
        // System.err.println("usage: " + programName + " -jms userid password");
        System.err.println("usage: " + programName + " apihost apiport userid password");
        throw new Exception("cannot connect");
    }
    VCellGuiInteractiveContextDefaultProvider defaultRequester = new VCellGuiInteractiveContextDefaultProvider();
    ClientServerManager clientServerManager = new ClientServerManager(csInfo, defaultRequester);
    clientServerManager.connect(null);
    return clientServerManager;
}
Also used : ClientServerManager(cbit.vcell.client.server.ClientServerManager) VCellGuiInteractiveContextDefaultProvider(cbit.vcell.client.VCellGuiInteractiveContextDefaultProvider) ClientServerInfo(cbit.vcell.client.server.ClientServerInfo) UserLoginInfo(org.vcell.util.document.UserLoginInfo)

Example 7 with ClientServerManager

use of cbit.vcell.client.server.ClientServerManager in project vcell by virtualcell.

the class ClientTester method mainInit.

/**
 * This method was created in VisualAge.
 * @return VCellConnection
 * @param args java.lang.String[]
 */
public static cbit.vcell.client.server.ClientServerManager mainInit(String[] args, String programName) throws Exception {
    ClientServerInfo csInfo = null;
    if (args.length == 3) {
        if (args[0].equalsIgnoreCase("-local")) {
            csInfo = ClientServerInfo.createLocalServerInfo(args[1], new UserLoginInfo.DigestedPassword(args[2]));
        }
    } else if (args.length == 4) {
        csInfo = ClientServerInfo.createRemoteServerInfo(args[0], Integer.parseInt(args[1]), args[2], new UserLoginInfo.DigestedPassword(args[3]));
    } else {
        System.err.println("usage: " + programName + " -local userid password");
        // System.err.println("usage: " + programName + " -jms userid password");
        System.err.println("usage: " + programName + " apihost apiport userid password");
        throw new Exception("cannot connect");
    }
    VCellGuiInteractiveContextDefaultProvider defaultRequester = new VCellGuiInteractiveContextDefaultProvider();
    ClientServerManager clientServerManager = new ClientServerManager(csInfo, defaultRequester);
    clientServerManager.connect(null);
    return clientServerManager;
}
Also used : ClientServerManager(cbit.vcell.client.server.ClientServerManager) VCellGuiInteractiveContextDefaultProvider(cbit.vcell.client.VCellGuiInteractiveContextDefaultProvider) ClientServerInfo(cbit.vcell.client.server.ClientServerInfo) UserLoginInfo(org.vcell.util.document.UserLoginInfo)

Aggregations

ClientServerManager (cbit.vcell.client.server.ClientServerManager)7 ClientServerInfo (cbit.vcell.client.server.ClientServerInfo)4 InteractiveContextDefaultProvider (cbit.vcell.client.server.ClientServerManager.InteractiveContextDefaultProvider)3 VCellGuiInteractiveContextDefaultProvider (cbit.vcell.client.VCellGuiInteractiveContextDefaultProvider)2 UserLoginInfo (org.vcell.util.document.UserLoginInfo)2 DigestedPassword (org.vcell.util.document.UserLoginInfo.DigestedPassword)2 InteractiveContext (cbit.vcell.client.server.ClientServerManager.InteractiveContext)1 UserPreferences (cbit.vcell.client.server.UserPreferences)1 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)1 DocumentManager (cbit.vcell.clientdb.DocumentManager)1 ExpressionException (cbit.vcell.parser.ExpressionException)1 VariableComparisonSummary (cbit.vcell.solver.test.VariableComparisonSummary)1 Point (java.awt.Point)1 BufferedImage (java.awt.image.BufferedImage)1 PropertyVetoException (java.beans.PropertyVetoException)1 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 Hashtable (java.util.Hashtable)1 JFileChooser (javax.swing.JFileChooser)1 SimpleFilenameFilter (org.vcell.util.SimpleFilenameFilter)1