diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java index 173e4aac5c0..15fe1b1c098 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java @@ -10,7 +10,7 @@ * component that contains this file: David McKnight, Kushal Munir, * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David McKnight (IBM) - [205986] daemon handshake needs a timeout * David McKnight (IBM) - [218685] [dstore] Unable to connect when using SSL. @@ -73,7 +73,7 @@ import org.eclipse.dstore.internal.extra.DomainNotifier; * If a connection is local, then a DataStore is instantiated * in the same process to be used by the client to communicate with miners (tools). * - * + * *
  • * If a connection is not local, then a virtual DataStore is instantiated in the * current process to communicate with the remote DataStore. If the client wishes @@ -82,9 +82,9 @@ import org.eclipse.dstore.internal.extra.DomainNotifier; * newly launched DataStore. Otherwise, a DataStore is expected to be running on * the remote machine under the same port that the client tries to connect to. *
  • - * + * * @noextend This class is not intended to be subclassed by clients. - * + * */ public class ClientConnection { @@ -151,7 +151,9 @@ public class ClientConnection * Creates a new ClientConnection instance * * @param name an identifier for this connection - * @param notifier the notifier used to keep the user interface in synch with the DataStore + * @param notifier the notifier used to keep the user interface in synch + * with the DataStore + * @since 3.0 changed DomainNotifier into IDomainNotifier */ public ClientConnection(String name, IDomainNotifier notifier) { @@ -164,8 +166,10 @@ public class ClientConnection * Creates a new ClientConnection instance * * @param name an identifier for this connection - * @param notifier the notifier used to keep the user interface in synch with the DataStore + * @param notifier the notifier used to keep the user interface in synch + * with the DataStore * @param initialSize the number of elements to preallocate in the DataStore + * @since 3.0 changed DomainNotifier into IDomainNotifier */ public ClientConnection(String name, IDomainNotifier notifier, int initialSize) { @@ -200,10 +204,18 @@ public class ClientConnection _dataStore.setSSLProperties(properties); } + /** + * @since 3.0 changed DataStoreCompatibilityHandler into + * IDataStoreCompatibilityHandler + */ public void setCompatibilityHandler(IDataStoreCompatibilityHandler handler){ _dataStore.setCompatibilityHandler(handler); } + /** + * @since 3.0 changed DataStoreCompatibilityHandler into + * IDataStoreCompatibilityHandler + */ public IDataStoreCompatibilityHandler getCompatibilityHandler(){ return _dataStore.getCompatibilityHandler(); } @@ -222,6 +234,7 @@ public class ClientConnection * Adds a loader to be used to instantiate the miners * * @param loader the loader + * @since 3.0 changed ExternalLoader into IExternalLoader */ public void addLoader(IExternalLoader loader) { @@ -429,6 +442,9 @@ public class ClientConnection return connect(launchStatus.getTicket()); } + /** + * @since 3.0 changed DataStoreTrustManager into IDataStoreTrustManager + */ public IDataStoreTrustManager getTrustManager() { if (_trustManager == null) @@ -725,7 +741,7 @@ public class ClientConnection /** * Connect to a remote daemon - * + * * @param daemonPort the port of the daemon * @return the status of the connection * @since 3.0 @@ -811,7 +827,7 @@ public class ClientConnection /** * Reeturns the launch socket - * + * * @return the launch socket */ public Socket getLaunchSocket() { diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java index ba7a86f6b5d..44ec4186b1d 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java @@ -7,21 +7,21 @@ * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients *******************************************************************************/ package org.eclipse.dstore.core.miners; -import org.eclipse.dstore.core.server.SecuredThread; import org.eclipse.dstore.core.model.DataStore; +import org.eclipse.dstore.core.server.SecuredThread; /** - * MinerThread is a utility class used for doing threaded operations in a miner. + * MinerThread is a utility class used for doing threaded operations in a miner. */ public abstract class MinerThread extends SecuredThread { @@ -36,9 +36,12 @@ public abstract class MinerThread extends SecuredThread { _isCancelled = false; } + /** - * Constructor with dataStore + * Constructor with dataStore. + * + * @since 3.0 */ public MinerThread(DataStore dataStore) { @@ -85,7 +88,7 @@ public abstract class MinerThread extends SecuredThread { try { - sleep(100); + sleep(100); // yield(); } catch (InterruptedException e) @@ -119,14 +122,14 @@ public abstract class MinerThread extends SecuredThread /** * Implement this method to provide the work implementation of this thread. * This method gets called periodically by the miner thread so te work done - * here must be atomic. Each time this is called a incremental unit of + * here must be atomic. Each time this is called a incremental unit of * work should be done. Once all the work is done, true should be - * returned. - * + * returned. + * * @return true if all the work is done. */ public abstract boolean doThreadedWork(); - + /** * Implement this method to provide any cleanup that is required after * all the work is done. diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java index 7d4cdb94ea8..9c7ffee947a 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java @@ -8,7 +8,7 @@ * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer * component that contains this file: Noriaki Takatsu and Masao Nishimoto - * + * * Contributors: * Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients * Jacob Garcowski (IBM) [225175] [dstore] [dstore] error handling change for Client @@ -22,45 +22,48 @@ import org.eclipse.dstore.core.server.IServerLogger; import org.eclipse.dstore.core.server.ServerReceiver; /** + * A DStore Client representing a user's connection in the multi-process + * dstore server. * @noextend This class is not intended to be subclassed by clients. + * @since 3.0 */ -public class Client +public class Client { public String _userid; private IServerLogger _logger; protected ServerReceiver _receiver; - + public void setUserid(String userid) { _userid = userid; } - + public String getUserid() { return _userid; } - + public void setLogger(IServerLogger logger) { _logger = logger; } - + public IServerLogger getLogger() { return _logger; } - + public String getProperty(String key) { return System.getProperty(key); } - + public void disconnectServerReceiver() { if (_receiver != null) _receiver.finish(); } - + public void setServerReceiver(ServerReceiver receiver) { _receiver = receiver; diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java index ef59c29a38b..3a9e72e9d83 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java @@ -206,6 +206,9 @@ public abstract class CommandHandler extends Handler _commands.clear(); } + /** + * @since 3.0 CommandGenerator moved from "internal" to API + */ public CommandGenerator getCommandGenerator() { return _commandGenerator; diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java index 91fbdf6241a..73028378149 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java @@ -1,35 +1,37 @@ /******************************************************************************** * Copyright (c) 2008 IBM Corporation. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer * component that contains this file: David McKnight. - * + * * Contributors: * David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients ********************************************************************************/ package org.eclipse.dstore.core.model; - +/** + * @since 3.0 + */ public class DefaultDataStoreCompatibilityHandler implements IDataStoreCompatibilityHandler { private DataStore _dataStore; - + public DefaultDataStoreCompatibilityHandler(DataStore dataStore){ _dataStore = dataStore; } - + public int checkCompatibility(String handshake){ - + String[] clientVersionStr = DataStoreAttributes.DATASTORE_VERSION.split("\\."); //$NON-NLS-1$ String[] serverVersionStr = handshake.split("\\."); //$NON-NLS-1$ - - int clientVersion = Integer.parseInt(clientVersionStr[VERSION_INDEX_VERSION]); - int serverVersion = Integer.parseInt(serverVersionStr[VERSION_INDEX_VERSION]); - + + int clientVersion = Integer.parseInt(clientVersionStr[VERSION_INDEX_VERSION]); + int serverVersion = Integer.parseInt(serverVersionStr[VERSION_INDEX_VERSION]); + if (handshake.equals(DataStoreAttributes.DATASTORE_VERSION)) { return HANDSHAKE_CORRECT; @@ -75,7 +77,7 @@ public class DefaultDataStoreCompatibilityHandler implements return HANDSHAKE_SERVER_RECENT_OLDER; } else - { + { return HANDSHAKE_SERVER_OLDER; } } @@ -87,7 +89,7 @@ public class DefaultDataStoreCompatibilityHandler implements } } } - + public void handleMissingCommand(DataElement descriptor, String keyName){ // default does nothing in this situation // System.out.println("missing command:"+keyName); diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java index 56cbd1fda57..519831619c1 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java @@ -1,19 +1,22 @@ /******************************************************************************** * Copyright (c) 2008 IBM Corporation. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer * component that contains this file: David McKnight. - * + * * Contributors: * David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients ********************************************************************************/ package org.eclipse.dstore.core.model; +/** + * @since 3.0 + */ public interface IDataStoreCompatibilityHandler { public static final int HANDSHAKE_INCORRECT = 0; public static final int HANDSHAKE_SERVER_OLDER = 1; @@ -23,22 +26,22 @@ public interface IDataStoreCompatibilityHandler { public static final int HANDSHAKE_SERVER_RECENT_OLDER = 5; public static final int HANDSHAKE_SERVER_RECENT_NEWER = 6; public static final int HANDSHAKE_TIMEOUT = 7; - + public static final int VERSION_INDEX_PROTOCOL = 0; public static final int VERSION_INDEX_VERSION = 1; public static final int VERSION_INDEX_MINOR = 2; - + /** * Checks whether a server is compatible with the current client * @param handshake the server handshake string in the form .. * @return whether this is considered compatible with the client datastore version */ public int checkCompatibility(String handshake); - + /** * This method is called to notify the compatibility handler that a call * to localDescriptorQuery() failed to return a result. - * + * * @param descriptor the object descriptor that the command was looked for under * @param keyName the value of the command descriptor to look for */ diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java index f751b613d4e..6f6270fd0c1 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java @@ -1,24 +1,26 @@ /******************************************************************************** * Copyright (c) 2008 IBM Corporation. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer * component that contains this file: David McKnight. - * + * * Contributors: * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness ********************************************************************************/ package org.eclipse.dstore.core.model; /** - * Classes that implement this and add themselves to the DataStore preference listeners - * get called each time a preference is changed. + * Classes that implement this and add themselves to the DataStore preference + * listeners get called each time a preference is changed. + * + * @since 3.0 */ public interface IDataStorePreferenceListener { - + /** * A DataStore preference has changed * @param property the property that has changed diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java index 9feedbc9e1a..862282b2113 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java @@ -15,33 +15,36 @@ package org.eclipse.dstore.core.server; -public interface IServerLogger +/** + * @since 3.0 + */ +public interface IServerLogger { /** * logInfo - * + * * @param minerName * @param message Message text to be logged. */ public void logInfo(String minerName, String message); - + /** * logWarning - * + * * @param minerName * @param message Message text to be logged. */ public void logWarning(String minerName, String message); - + /** * logError - * + * * @param minerName * @param message Message text to be logged. * @param exception Exception that generated the error. Used to print a stack trace. */ public void logError(String minerName, String message, Throwable exception); - + /** * logDebugMessage * @param minerName