From 0edfb1a1226e04aa2f96baf2c9e086113d43c795 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Mon, 19 May 2008 19:28:25 +0000 Subject: [PATCH] [cleanup] Get rid of invalid @noinstantiate on abstract classes --- .../dstore/core/model/CommandHandler.java | 65 +++++++++---------- .../dstore/core/model/UpdateHandler.java | 65 ++++++++++--------- .../eclipse/dstore/core/util/Receiver.java | 1 - 3 files changed, 65 insertions(+), 66 deletions(-) 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 c2cc6951afd..ef59c29a38b 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 @@ -7,10 +7,10 @@ * * 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: * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed @@ -25,18 +25,17 @@ import org.eclipse.dstore.core.util.CommandGenerator; /** *
- * Abtract class for handling commands. A CommandHandler
is a Handler
that
- * contains a queue of commands to be sent to miners. Each DataStore instance uses a single
- * command handler that periodically sends it's queue either to a server or directly
- * to miners.
+ * Abstract class for handling commands. A CommandHandler
is a
+ * Handler
that contains a queue of commands to be sent to miners.
+ * Each DataStore instance uses a single command handler that periodically sends
+ * it's queue either to a server or directly to miners.
*
- * The CommandHandler is the means by which the DataStore sends information or files from - * the client to the remote tools. + * The CommandHandler is the means by which the DataStore sends information or + * files from the client to the remote tools. *
- * + * * @noextend This class is not intended to be subclassed by clients. - * @noinstantiate This class is not intended to be instantiated by clients. */ public abstract class CommandHandler extends Handler { @@ -96,7 +95,7 @@ public abstract class CommandHandler extends Handler { _commands.add(command); } - } + } } notifyInput(); } @@ -114,7 +113,7 @@ public abstract class CommandHandler extends Handler /** * Create and add a new command object to the command queue. - * + * * @param commandDescriptor the descriptor for the new command * @param arguments the arguments for the command * @param object the subject of the command @@ -131,7 +130,7 @@ public abstract class CommandHandler extends Handler /** * Create and add a new command object to the command queue. - * + * * @param commandDescriptor the descriptor for the new command * @param arg the arg for the command * @param object the subject of the command @@ -148,7 +147,7 @@ public abstract class CommandHandler extends Handler /** * Create and add a new command object to the command queue. - * + * * @param commandDescriptor the descriptor for the new command * @param object the subject of the command * @param refArg indicates whether the subject should be represented in the command as a @@ -182,7 +181,7 @@ public abstract class CommandHandler extends Handler DataElement status = null; if ((cmd != null) && _dataStore != null) { - + status = cmd.get(cmd.getNestedSize() -1); if (status != null && !status.getName().equals(DataStoreResources.model_done)) { @@ -206,7 +205,7 @@ public abstract class CommandHandler extends Handler _commands.clear(); } - + public CommandGenerator getCommandGenerator() { return _commandGenerator; @@ -216,18 +215,18 @@ public abstract class CommandHandler extends Handler * Implemented to provide the means by which commands in the queue are sent */ public abstract void sendCommands(); - - + + /** * Implemented to provide the means by which file bytes are sent * @param fileName the name of the file to send * @param bytes to bytes of the file to send * @param size the number of bytes to send * @param binary indicates whether to send the bytes as binary or text - */ + */ public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary); - - + + /** * Implemented to provide the means by which file bytes are sent * @param fileName the name of the file to send @@ -235,18 +234,18 @@ public abstract class CommandHandler extends Handler * @param size the number of bytes to send * @param binary indicates whether to send the bytes as binary or text * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with - */ + */ public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); - + /** * Implemented to provide the means by which file bytes are sent and appended * @param fileName the name of the file to send * @param bytes to bytes of the file to send * @param size the number of bytes to send * @param binary indicates whether to send the bytes as binary or text - */ + */ public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary); - + /** * Implemented to provide the means by which file bytes are sent and appended * @param fileName the name of the file to send @@ -254,7 +253,7 @@ public abstract class CommandHandler extends Handler * @param size the number of bytes to send * @param binary indicates whether to send the bytes as binary or text * @param byteStreamHandlerId indicates which byte stream handler to receive the bytes with - */ + */ public abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); /** @@ -263,7 +262,7 @@ public abstract class CommandHandler extends Handler * @param className the name of the class to send */ public abstract void sendClass(String className); - + /** * Implemented to provide the means by which classes are sent * across the comm channel. @@ -271,14 +270,14 @@ public abstract class CommandHandler extends Handler * @param classByteStreamHandlerId indicates which class byte stream handler to receive the class with */ public abstract void sendClass(String className, String classByteStreamHandlerId); - - + + /** * Runs the specified class on the remote system */ public abstract void sendClassInstance(IRemoteClassInstance runnable, String classByteStreamHandlerId); - - + + /** * Causes the current thread to wait until this class request has been * fulfilled. @@ -290,7 +289,7 @@ public abstract class CommandHandler extends Handler super.waitForInput(); } } - + /** * Implemented to provide the means by which classes are requested * across the comm channel. diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java index 142809dda92..f11ff6545b0 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java @@ -7,10 +7,10 @@ * * 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: * David McKnight (IBM) [202822] should not be synchronizing on clean method * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed @@ -26,17 +26,18 @@ import org.eclipse.dstore.internal.core.util.DataElementRemover; /** *
- * Abtract class for handling updates. A UpdateHandler
is a Handler
that
- * contains a queue of data responses to be sent to the client. Each DataStore instance uses a single
- * update handler that periodically sends it's data queue either to a client or directly
- * to a domain listener on the client.
+ * Abstract class for handling updates. A UpdateHandler
is a
+ * Handler
that contains a queue of data responses to be sent to
+ * the client. Each DataStore instance uses a single update handler that
+ * periodically sends it's data queue either to a client or directly to a domain
+ * listener on the client.
*
- * The UpdateHandler is the means by which the DataStore sends information or files from the remote tools to the client. + * The UpdateHandler is the means by which the DataStore sends information or + * files from the remote tools to the client. *
- * + * * @noextend This class is not intended to be subclassed by clients. - * @noinstantiate This class is not intended to be instantiated by clients. */ public abstract class UpdateHandler extends Handler { @@ -84,16 +85,16 @@ public abstract class UpdateHandler extends Handler { DataElement parent = child.getParent(); DataElementRemover.addToRemovedCount(); - + cleanChildren(child); // clean the children - + if (child.isSpirit()) { // officially delete this now child.delete(); } child.clear(); - + if (parent != null) { synchronized (parent) @@ -109,9 +110,9 @@ public abstract class UpdateHandler extends Handler } // delete objects under temproot _dataStore.getTempRoot().removeNestedData(); - + } - + /** * Recursively clean children for deletion * @param parent @@ -123,8 +124,8 @@ public abstract class UpdateHandler extends Handler { for (int i = 0; i < nestedData.size(); i++){ DataElement child = (DataElement)nestedData.get(i); - cleanChildren(child); - + cleanChildren(child); + if (child.isSpirit()) { // officially delete this now @@ -180,7 +181,7 @@ public abstract class UpdateHandler extends Handler } else { - + if (_dataStore != null && object != null && !object.isDeleted()) { if (object.getType().equals(DataStoreResources.model_status)) @@ -189,8 +190,8 @@ public abstract class UpdateHandler extends Handler { //DKM // move to the back of the queue - // this is done so that if status that was already queued changed to done in between - // requests, and had not yet been transferred over comm layer, the completed status + // this is done so that if status that was already queued changed to done in between + // requests, and had not yet been transferred over comm layer, the completed status // object does not come back to client (as "done") before the results of a query _dataObjects.remove(object); _dataObjects.add(object); @@ -198,11 +199,11 @@ public abstract class UpdateHandler extends Handler } } } - } + } } notifyInput(); } - + /** * Causes the current thread to wait until this class request has been * fulfilled. @@ -219,7 +220,7 @@ public abstract class UpdateHandler extends Handler * Implemented to provide the means by which updates on the queue are sent. */ public abstract void sendUpdates(); - + /** * Implemented to provide the means by which files are sent @@ -229,7 +230,7 @@ public abstract class UpdateHandler extends Handler * @param binary indicates whether to send the bytes as binary or text */ public abstract void updateFile(String path, byte[] bytes, int size, boolean binary); - + /** * Implemented to provide the means by which files are sent and appended * @param path the path of the file to send @@ -238,7 +239,7 @@ public abstract class UpdateHandler extends Handler * @param binary indicates whether to send the bytes as binary or text */ public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary); - + /** * Implemented to provide the means by which files are sent * @param path the path of the file to send @@ -248,7 +249,7 @@ public abstract class UpdateHandler extends Handler * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes */ public abstract void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); - + /** * Implemented to provide the means by which files are sent and appended * @param path the path of the file to send @@ -258,26 +259,26 @@ public abstract class UpdateHandler extends Handler * @param byteStreamHandlerId indicates the byte stream handler to receive the bytes */ public abstract void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId); - + /** * Implemented to provide the means by which classes are requested * across the comm channel. * @param className the name of the class to request */ public abstract void requestClass(String className); - + /** * Implemented to provide the means by which keepalive requests are sent * across the comm channel. */ public abstract void sendKeepAliveRequest(); - + /** * Impleted to provide the means by which a class on the host is updated on the client * @param runnable * @param deserializebyteStreamHandlerId */ - public abstract void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId); + public abstract void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId); /** * Implemented to provide the means by which classes are sent @@ -285,7 +286,7 @@ public abstract class UpdateHandler extends Handler * @param className the name of the class to send */ public abstract void sendClass(String className); - + /** * Implemented to provide the means by which classes are sent * across the comm channel. @@ -299,5 +300,5 @@ public abstract class UpdateHandler extends Handler * across the comm channel. */ public abstract void sendKeepAliveConfirmation(); - + } diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java index b799f76c922..e5e074865c4 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java @@ -37,7 +37,6 @@ import org.eclipse.dstore.internal.core.util.XMLparser; * communication layer. * * @noextend This class is not intended to be subclassed by clients. - * @noinstantiate This class is not intended to be instantiated by clients. */ public abstract class Receiver extends SecuredThread implements IDataStorePreferenceListener {