Search in sources :

Example 1 with InteractiveContext

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

the class ClientFactory method createRemoteClientServerManager.

public static ClientServerManager createRemoteClientServerManager(String apihost, Integer apiport, String username, String password) {
    DigestedPassword digestedPassword = new DigestedPassword(password);
    ClientServerInfo csInfo = ClientServerInfo.createRemoteServerInfo(apihost, apiport, username, digestedPassword);
    InteractiveContextDefaultProvider defaultInteractiveContextProvider = new VCellGuiInteractiveContextDefaultProvider();
    ClientServerManager clientServerManager = new ClientServerManager(csInfo, defaultInteractiveContextProvider);
    RequestManagerAdapter requestManager = new RequestManagerAdapter();
    TopLevelWindowManager windowManager = new TopLevelWindowManager(requestManager) {

        @Override
        public Component getComponent() {
            return null;
        }

        @Override
        public String getManagerID() {
            return null;
        }

        @Override
        public boolean isRecyclable() {
            return false;
        }
    };
    InteractiveContext requester = new VCellGuiInteractiveContext(windowManager);
    clientServerManager.connect(requester);
    return clientServerManager;
}
Also used : InteractiveContextDefaultProvider(cbit.vcell.client.server.ClientServerManager.InteractiveContextDefaultProvider) ClientServerManager(cbit.vcell.client.server.ClientServerManager) InteractiveContext(cbit.vcell.client.server.ClientServerManager.InteractiveContext) ClientServerInfo(cbit.vcell.client.server.ClientServerInfo) DigestedPassword(org.vcell.util.document.UserLoginInfo.DigestedPassword)

Aggregations

ClientServerInfo (cbit.vcell.client.server.ClientServerInfo)1 ClientServerManager (cbit.vcell.client.server.ClientServerManager)1 InteractiveContext (cbit.vcell.client.server.ClientServerManager.InteractiveContext)1 InteractiveContextDefaultProvider (cbit.vcell.client.server.ClientServerManager.InteractiveContextDefaultProvider)1 DigestedPassword (org.vcell.util.document.UserLoginInfo.DigestedPassword)1