Initial commit from SVN.

This commit is contained in:
wcrisman
2014-05-30 10:31:51 -07:00
commit b45e56b890
1968 changed files with 370949 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
/*
* Copyright (c) 2003,2009 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.foundation.tcv.controller;
import com.common.util.*;
import com.foundation.view.ViewSystemMetadata;
public interface IClientSessionController {
//Identifiers used to send session data back to the client after registering.//
public static final String SESSION_DATA_CLIENT_NUMBER = IThinServerController.SESSION_DATA_CLIENT_NUMBER;
public static final String SESSION_DATA_LICENSE = IThinServerController.SESSION_DATA_LICENSE;
//public static final String SESSION_DATA_APPLICATION_KEY = IThinServerController.SESSION_DATA_APPLICATION_KEY;
public static final String SESSION_DATA_CACHE_ALGORITHM = IThinServerController.SESSION_DATA_CACHE_ALGORITHM;
public static final String SESSION_DATA_REQUIRED_APPLICATION_BROWSER_VERSION = IThinServerController.SESSION_DATA_REQUIRED_APPLICATION_BROWSER_VERSION;
public static final String SESSION_DATA_REQUIRED_APPLICATION_VERSION = IThinServerController.SESSION_DATA_REQUIRED_APPLICATION_VERSION;
public static final String SESSION_DATA_FUTURE_APPLICATION_BROWSER_VERSION = IThinServerController.SESSION_DATA_FUTURE_APPLICATION_BROWSER_VERSION;
public static final String SESSION_DATA_FUTURE_APPLICATION_VERSION = IThinServerController.SESSION_DATA_FUTURE_APPLICATION_VERSION;
public static final String SESSION_DATA_DOWNLOAD_SERVERS = IThinServerController.SESSION_DATA_DOWNLOAD_SERVERS;
public static final String SESSION_DATA_APPLICATION_SERVERS = IThinServerController.SESSION_DATA_APPLICATION_SERVERS;
public static final String SESSION_DATA_REDIRECT_ADDRESSES = IThinServerController.SESSION_DATA_REDIRECT_ADDRESSES;
public static final String SESSION_DATA_FORWARD_ADDRESS = IThinServerController.SESSION_DATA_FORWARD_ADDRESS;
public static final String SESSION_DATA_SERVER_SESSION_CONTROLLER = IThinServerController.SESSION_DATA_SERVER_SESSION_CONTROLLER;
public static final String SESSION_DATA_RESOURCE_PACKAGE_DATA = IThinServerController.SESSION_DATA_RESOURCE_PACKAGE_DATA;
public static final String SESSION_DATA_CODE_DATA = IThinServerController.SESSION_DATA_CODE_DATA;
public static final String REGISTRATION_APPLICATION_BROWSER_VERSION = IThinServerController.REGISTRATION_APPLICATION_BROWSER_VERSION;
public static final String REGISTRATION_APPLICATION_VERSION = IThinServerController.REGISTRATION_APPLICATION_VERSION;
public static final String REGISTRATION_CLIENT_CONTROLLER = IThinServerController.REGISTRATION_CLIENT_CONTROLLER;
public static final String REGISTRATION_APPLICATION_NAME = IThinServerController.REGISTRATION_APPLICATION_NAME;
/**
* Creates a view and prepares it to receive messages.
* @param viewNumber The new view's number as defined by the server.
*/
public void createView(long viewNumber);
/**
* Processes a collection of messages from the client.
* @param messageOrderNumber The number indicating the order in which the messages should be processed. This keeps one set of messages from getting processed before an earlier set of messages.
* @param viewNumber The number identifying which session view will receive the messages.
* @param viewMessages The collection of view messages to be processed.
* @param waitForResponse Whether the thread should wait to send a response, or return immediatly after the messages begin processing.
* @param twoWayMessageContext Whether the server is sending these messages in direct response to a client initiated 2-way message.
* @return The return value of the last message or null if not waiting for a response.
*/
public Object processMessages(long messageOrderNumber, long viewNumber, IList viewMessages, boolean waitForResponse, boolean twoWayMessageContext);
/**
* Gets the view system metadata which describes the view system including the displays.
* @return The metadata describing the view system.
*/
public ViewSystemMetadata getViewSystemMetadata();
/**
* Sets the client's current resource groups.
* @param categoryKeys The array of resource categories whose associated groups should be made current. The system will load all resource groups associated with the first through the last key (not replacing already loaded groups). The default category is always assumed such that all resource groups will be represented in the current set.
*/
public void setCurrentResources(String[] categoryKeys);
}//IClientSessionController//

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2003,2009 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.foundation.tcv.controller;
import com.common.util.*;
public interface IServerSessionController {
/**
* Unregisters the client.
* This should normally be called before the client disconnects from the server so that resources can be released in a timely mannar.
*/
public void closeSession();
/**
* Requests the server open the initial view for the client.
* <p>TODO: Should we automate the login here somehow? We could autologin for reconnects, or we could autologin for some types of applications?</p>
*/
public void requestInitialView();
/**
* Requests the resource group data for each given resource package.
* @param resourcePackages The resource packages whose group data is either missing or stale on the client. This will be a list of ResourcePackage instances.
* @return The resource group data for the packages. This will be in compressed serialized form in the same order (1-1) as the resource packages passed to the method.
*/
public IList requestResourceGroupData(IList resourcePackages);
/**
* Requests the resource data for each given resource group category.
* @param resourceCategories The resource group category whose data is either missing or stale on the client. This will be a list of ResourceCategory instances.
* @return The resource data for the categories. This will be in compressed serialized form in the same order (1-1) as the resource categories passed to the method.
*/
public IList requestResourceData(IList resourceCategories);
/**
* Requests the bytes for the given code archive names.
* @param codeNames The names of the archives which the client is missing or out of date.
* @return The contents of the archives in the same order as the code names. If any archive is not capable of being located it's position in the array will be null.
*/
public byte[][] requestCodeData(String[] codeNames);
/**
* Processes a collec tion of messages from the client.
* @param messageOrderNumber The number indicating the order in which the messages should be processed. This keeps one set of messages from getting processed before an earlier set of messages.
* @param viewNumber The number identifying which session view will receive the messages.
* @param viewMessages The collection of view messages to be processed.
* @param waitForResponse Whether the thread should wait to send a response, or return immediatly after the messages begin processing.
* @return The return value of the last message or null if not waiting for a response.
*/
public Object processMessages(long messageOrderNumber, long viewNumber, IList viewMessages, boolean waitForResponse);
}//IServerSessionController//

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2005,2009 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.foundation.tcv.controller;
public interface ISessionViewController {
public static final int MESSAGE_OPEN_TEMP_FILE = -1;
public static final int MESSAGE_LOAD_FROM_FILE = -2;
public static final int MESSAGE_SAVE_TO_FILE = -3;
public static final int MESSAGE_LOAD_FROM_FILE_STREAMED = -4;
public static final int MESSAGE_SAVE_TO_FILE_STREAMED = -5;
public static final int MESSAGE_SAVE_TO_FILES_STREAMED = -6;
public static final int MESSAGE_COLLECT_FILES_TO_RENAME = -7;
public static final int MESSAGE_RENAME_FILES = -8;
public static final boolean DEBUG = false;
}//ISessionViewController//

View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 2003,2009 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.foundation.tcv.controller;
import com.common.util.*;
public interface IThinServerController {
public static final String BOUND_NAME = "ThinServerController";
//Identifiers used to send session data back to the client after registering.//
public static final String SESSION_DATA_CLIENT_NUMBER = "clientNumber";
/** The license which is used by the client to validate that the server is authentic (not spoofing the application). */
public static final String SESSION_DATA_LICENSE = "license";
/** Not currently used. This may never be used. */
public static final String SESSION_DATA_CACHE_ALGORITHM = "cacheAlgorithm";
/** The version string identifying the version of the application browser to be used for this application. */
public static final String SESSION_DATA_REQUIRED_APPLICATION_BROWSER_VERSION = "requiredApplicationBrowserVersion";
/** The version string identifying the version of the application to be used. This refers to the application's installer versus the application browser's installer. */
public static final String SESSION_DATA_REQUIRED_APPLICATION_VERSION = "requiredApplicationVersion";
/** The data will be a list of String instances convertable to Address instances which can be used to download updates for the application. */
public static final String SESSION_DATA_DOWNLOAD_SERVERS = "downloadServers";
/** The data will be a list of String instances convertable to Address instances which can be used to run the application. */
public static final String SESSION_DATA_APPLICATION_SERVERS = "applicationServers";
/** Not currently used. */
public static final String SESSION_DATA_REDIRECT_ADDRESSES = "redirectAddresses";
/** Used to tell the client that it should connect to the given address (as a string) (in the same server farm) to start the application. */
public static final String SESSION_DATA_FORWARD_ADDRESS = "forwardAddress";
/** Provides the client with a session object reference. */
public static final String SESSION_DATA_SERVER_SESSION_CONTROLLER = "serverSessionController";
/** The version string identifying the future version of the application browser to be used for this application. */
public static final String SESSION_DATA_FUTURE_APPLICATION_BROWSER_VERSION = "";
/** The version string identifying the future version of the application to be used. This refers to the application's installer versus the application browser's installer. */
public static final String SESSION_DATA_FUTURE_APPLICATION_VERSION = "";
/** The compressed and serialized IList of ResourcePackages containing all resource package data from the server. The client must mix this with resource package data on the client. */
public static final String SESSION_DATA_RESOURCE_PACKAGE_DATA = "resourcePackageData";
/** The String[] containing jar name and jar hash pairs for required code resources. */
public static final String SESSION_DATA_CODE_DATA = "codeData";
//Identifiers used to send to the server when the client is registering.//
/** The version of the application browser (string) that is trying to make the connection. */
public static final String REGISTRATION_APPLICATION_BROWSER_VERSION = "applicationBrowserVersion";
/** The version of the application (string) that is trying to make the connection. */
public static final String REGISTRATION_APPLICATION_VERSION = "applicationVersion";
/** The proxy to the client's controller that will manage the connection. */
public static final String REGISTRATION_CLIENT_CONTROLLER = "clientController";
/** The name of the application that the client is trying to connect to. */
public static final String REGISTRATION_APPLICATION_NAME = "applicationName";
/**
* Gets the download size and the number of chunks.
* @param version The version to be downloaded. This should currently always be the current version.
* @return The total size of the download in bytes.
*/
public int getClientDownloadSize(String version);
/**
* Downloads the requested client version to the client. This method may not be supported in the future.
* @param version The version to be downloaded. This should currently always be the current version.
* @param previouslyDownloadedByteCount The number of bytes already on the client.
* @return A series of bytes begining right after the last downloaded byte number.
*/
public byte[] getClientDownloadChunk(String version, int previouslyDownloadedByteCount);
/**
* Registers a client with the server.
* @param registrationData A map of registration data. The map is used to allow changes to occur without preventing old clients from connecting and being told they require updating. See the REGISTRATION_ identifiers.
* @return The map of session data, including: The client's unique id number that it must use when sending messages; signed license; session proxy or alternate server address; and/or client version change information; and the resource packages data. This may be null if the application is not being served.
*/
public LiteHashMap registerClient(IHashMap registrationData);
}//IThinServerController//