summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authoreea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-10 20:12:43 +0000
committereea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-10 20:12:43 +0000
commitc01ce850adaf528342fcdbb74e0965b2ec416a58 (patch)
treec30bdc92756af9d00d17d9fd02db35866964c9e6 /java
parent5156f7eed11b42486efa22694c067a93907dfdf1 (diff)
downloadATCD-c01ce850adaf528342fcdbb74e0965b2ec416a58.tar.gz
Fixed most of the javadoc commenting problems. To make it perfect, all
the source files would have to exist in a directory structure identical to their package names. With these changes, though, people can still view the packages, classes, and methods correctly. I mainly corrected the @see and @exception statements.
Diffstat (limited to 'java')
-rw-r--r--java/src/AcceptStrategy.java4
-rw-r--r--java/src/Acceptor.java13
-rw-r--r--java/src/AddServiceObjectNode.java8
-rw-r--r--java/src/Connector.java14
-rw-r--r--java/src/CreationStrategy.java5
-rw-r--r--java/src/EventHandler.java3
-rw-r--r--java/src/Makefile6
-rw-r--r--java/src/MessageQueue.java12
-rw-r--r--java/src/ParseNode.java10
-rw-r--r--java/src/RemoveNode.java4
-rw-r--r--java/src/ResumeNode.java4
-rw-r--r--java/src/SOCKAcceptor.java1
-rw-r--r--java/src/SOCKStream.java1
-rw-r--r--java/src/ServiceConfig.java118
-rw-r--r--java/src/ServiceLoader.java2
-rw-r--r--java/src/ServiceRepository.java10
-rw-r--r--java/src/StrategyAcceptor.java16
-rw-r--r--java/src/SuspendNode.java4
-rw-r--r--java/src/Task.java3
-rw-r--r--java/src/TimedWait.java3
20 files changed, 109 insertions, 132 deletions
diff --git a/java/src/AcceptStrategy.java b/java/src/AcceptStrategy.java
index 7b48510840e..e5af43f07f5 100644
--- a/java/src/AcceptStrategy.java
+++ b/java/src/AcceptStrategy.java
@@ -65,8 +65,8 @@ public class AcceptStrategy
* should overwrite this method to provide a different accept
* strategy.
*@param sh Svc Handler in which to accept the connection
- *@exception SocketException
- *@exception IOException
+ *@exception SocketException Socket error
+ *@exception IOException Socket error
*@return 0
*/
public int acceptSvcHandler (SvcHandler sh) throws
diff --git a/java/src/Acceptor.java b/java/src/Acceptor.java
index 1db6e01f7b5..562b5a85d07 100644
--- a/java/src/Acceptor.java
+++ b/java/src/Acceptor.java
@@ -58,7 +58,10 @@ import JACE.ServiceConfigurator.*;
* <tt>AcceptorStrategy</tt> class.</blockquote>
*
*
- * @see java.lang.Class,ACE.Connection.SvcHandler,ACE.SOCK_SAP.SOCKAcceptor */
+ * @see java.lang.Class
+ * @see JACE.Connection.SvcHandler
+ * @see JACE.SOCK_SAP.SOCKAcceptor
+ */
public class Acceptor extends ServiceObject
{
/**
@@ -66,7 +69,7 @@ public class Acceptor extends ServiceObject
* an instance is created via this method, <tt>setHandlerFactory</tt>
* must be called prior to using <tt>accept</tt>.
*
- * @see ACE.Connection.Acceptor.setHandlerFactory
+ * @see JACE.Connection.Acceptor.setHandlerFactory
*/
public Acceptor ()
{
@@ -78,7 +81,7 @@ public class Acceptor extends ServiceObject
* an instance of a SvcHandler when a connection is accepted
* (typically obtained by calling <tt>Class.classForName</tt>).
*
- *@see java.lang.Class.classForName
+ *@see java.lang.Class.forName
*/
public Acceptor (Class handlerFactory)
{
@@ -90,9 +93,9 @@ public class Acceptor extends ServiceObject
* no-arg constructor.
*@param handlerFactory meta-class reference used to create
* an instance of a SvcHandler when a connection is accepted
- * (typically obtained by calling <tt>Class.classForName</tt>).
+ * (typically obtained by calling <tt>Class.forName</tt>).
*
- *@see java.lang.Class.classForName
+ *@see java.lang.Class.forName
*/
public void setHandlerFactory (Class handlerFactory)
{
diff --git a/java/src/AddServiceObjectNode.java b/java/src/AddServiceObjectNode.java
index 603b5b61098..aa99c51ebc3 100644
--- a/java/src/AddServiceObjectNode.java
+++ b/java/src/AddServiceObjectNode.java
@@ -2,21 +2,17 @@ package JACE.ServiceConfigurator;
import java.io.*;
import JACE.OS.*;
-import java_cup.runtime.*;
class AddServiceObjectNode extends ParseNode
{
- public AddServiceObjectNode (int act_num)
+ public AddServiceObjectNode ()
{
- super(act_num);
-
this.locator_ = new String();
this.params_ = new String();
}
- /* String with possible locator information -- used when trying to load
- old C++ format files */
+ /* This should be the class name, fully qualified or in the class path */
public String locator ()
{
return this.locator_;
diff --git a/java/src/Connector.java b/java/src/Connector.java
index 81b701e7b4d..7393ea486e0 100644
--- a/java/src/Connector.java
+++ b/java/src/Connector.java
@@ -22,7 +22,7 @@ import JACE.ServiceConfigurator.*;
* <h2>SYNOPSIS</h2>
*<blockquote>
* Abstract factory for connecting a
- * (<a href="ACE.Connection.SvcHandler.html"><tt>SvcHandler</tt></a>),
+ * (<a href="JACE.Connection.SvcHandler.html"><tt>SvcHandler</tt></a>),
* to an application.
*</blockquote>
*
@@ -34,7 +34,7 @@ import JACE.ServiceConfigurator.*;
* control to that instance.
*<p>
* TCP is the transport mechanism used, via
- * <a href="ACE.SOCK_SAP.SOCKConnector.html#_top_"><tt>SOCKConnector</tt></a>.
+ * <a href="JACE.SOCK_SAP.SOCKConnector.html#_top_"><tt>SOCKConnector</tt></a>.
*</blockquote>
*
*<h2>NOTES</h2>
@@ -43,7 +43,8 @@ import JACE.ServiceConfigurator.*;
* Future versions are expected to rectify this discrepancy.
*</blockquote>
*
- *@see SOCKConnector,SvcHandler
+ *@see SOCKConnector
+ *@see SvcHandler
*/
public class Connector extends ServiceObject
{
@@ -82,6 +83,11 @@ public class Connector extends ServiceObject
/**
* Connect to the server.
*@param sh Svc Handler to use to handle the connection
+ *@exception UnknownHostException Bad host
+ *@exception SocketException Socket error
+ *@exception InstantiationException Couldn't create new SOCKConnector
+ *@exception IllegalAccessException No strategy available
+ *@exception IOException Socket error
*/
public void connect (SvcHandler sh) throws UnknownHostException,
SocketException,
@@ -103,6 +109,8 @@ public class Connector extends ServiceObject
* strategy, if needed.
*@param sh Svc Handler to use to handle the connection
*@return 0
+ *@exception SocketException Socket error
+ *@exception IOException Socket error
*/
protected int connectSvcHandler (SvcHandler sh) throws
SocketException, IOException
diff --git a/java/src/CreationStrategy.java b/java/src/CreationStrategy.java
index 219dc712668..f929ef86204 100644
--- a/java/src/CreationStrategy.java
+++ b/java/src/CreationStrategy.java
@@ -29,7 +29,10 @@ package JACE.Connection;
* linking the handler, etc.).
*</blockquote>
*
- *@see SvcHandler,StrategyAcceptor,AcceptStrategy,ActivateStrategy
+ *@see SvcHandler
+ *@see StrategyAcceptor
+ *@see AcceptStrategy
+ *@see ActivateStrategy
*/
public class CreationStrategy
{
diff --git a/java/src/EventHandler.java b/java/src/EventHandler.java
index 53a9974bf08..25057a459c8 100644
--- a/java/src/EventHandler.java
+++ b/java/src/EventHandler.java
@@ -36,7 +36,8 @@ import JACE.ASX.TimeValue;
* portion will make any sense or fit into the Java model for I/O.
*</blockquote>
*
- *@see TimerQueue,Reactor
+ *@see TimerQueue
+ *@see Reactor
*/
public interface EventHandler
{
diff --git a/java/src/Makefile b/java/src/Makefile
index 2ca55c03c9c..ebdf2329861 100644
--- a/java/src/Makefile
+++ b/java/src/Makefile
@@ -124,17 +124,13 @@ socksap: os $(addsuffix .java,$(pkg_socksap))
pkg_svcconfig = \
ServiceLoader \
- ClassNameGenerator \
ClassReader \
- parser \
- sym \
ParseNode \
SuspendNode \
ResumeNode \
RemoveNode \
ServiceRecord \
ServiceObjectRecord \
- Yylex \
AddServiceObjectNode \
ServiceObject \
ServiceConfig \
@@ -151,7 +147,7 @@ packages = JACE \
JACE.OS \
JACE.Reactor \
JACE.SOCK_SAP \
- JACE.Service_Configurator \
+ JACE.ServiceConfigurator \
JACE.Timers
diff --git a/java/src/MessageQueue.java b/java/src/MessageQueue.java
index f71c91ca857..e25fdc65238 100644
--- a/java/src/MessageQueue.java
+++ b/java/src/MessageQueue.java
@@ -65,7 +65,8 @@ class NotEmptyCondition extends TimedWait
* consiste of <tt>MessageBlock</tt>s.
*</blockquote>
*
- *@see MessageBlock,TimeValue
+ *@see MessageBlock
+ *@see TimeValue
*/
public class MessageQueue
{
@@ -116,6 +117,8 @@ public class MessageQueue
* Enqueue a <MessageBlock> into the <MessageQueue> in accordance
* with its <msgPriority> (0 is lowest priority). Note that the
* call will block (unless the queue has been deactivated).
+ *
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*@param newItem item to enqueue onto the Message Queue
*@return -1 on failure, else the number of items still on the queue.
*/
@@ -134,6 +137,7 @@ public class MessageQueue
* (unless operation completes before)
*@return -1 on failure, else the number of items still on the
* queue.
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
public synchronized int enqueue (MessageBlock newItem,
TimeValue tv) throws InterruptedException
@@ -169,6 +173,7 @@ public class MessageQueue
* that the call will block (unless the queue has been deactivated).
*@param newItem item to enqueue onto the Message Queue
*@return -1 on failure, else the number of items still on the queue.
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
public synchronized int enqueueTail (MessageBlock newItem) throws InterruptedException
{
@@ -183,6 +188,7 @@ public class MessageQueue
*@param tv amount of time (TimeValue) to wait before returning
* (unless operation completes before)
*@return -1 on failure, else the number of items still on the queue.
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
public synchronized int enqueueTail (MessageBlock newItem,
TimeValue tv) throws InterruptedException
@@ -218,6 +224,7 @@ public class MessageQueue
* that the call will block (unless the queue has been deactivated).
*@param newItem item to enqueue onto the Message Queue
*@return -1 on failure, else the number of items still on the queue.
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
public synchronized int enqueueHead (MessageBlock newItem) throws InterruptedException
{
@@ -232,6 +239,7 @@ public class MessageQueue
*@param tv amount of time (TimeValue) to wait before returning
* (unless operation completes before)
*@return -1 on failure, else the number of items still on the queue.
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
public synchronized int enqueueHead (MessageBlock newItem,
TimeValue tv) throws InterruptedException
@@ -267,6 +275,7 @@ public class MessageQueue
* <MessageQueue>. Note that the call will block (unless the queue
* has been deactivated).
*@return null on failure, else the <MessageBlock> at the head of queue.
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
public synchronized MessageBlock dequeueHead () throws InterruptedException
{
@@ -278,6 +287,7 @@ public class MessageQueue
* <MessageQueue>. Note that the call will return if <timeout>
* amount of time expires or if the queue has been deactivated.
*@return null on failure, else the <MessageBlock> at the head of queue.
+ *@exception InterruptedException Interrupted while accessing queue
*/
public synchronized MessageBlock dequeueHead (TimeValue tv) throws InterruptedException
{
diff --git a/java/src/ParseNode.java b/java/src/ParseNode.java
index 6a4db754227..cdf8bb57955 100644
--- a/java/src/ParseNode.java
+++ b/java/src/ParseNode.java
@@ -7,8 +7,7 @@
* ParseNode.java
*
* Base class for the data types used in the parse tree for adjusting
- * services. Things like SuspendNode extend this. They help connect
- * CUP/JLex with the service configurator system.
+ * services. Things like SuspendNode extend this.
*
*@author Everett Anderson
*
@@ -17,18 +16,15 @@ package JACE.ServiceConfigurator;
import java.io.*;
import JACE.OS.*;
-import java_cup.runtime.*;
-public class ParseNode extends java_cup.runtime.symbol
+public class ParseNode
{
/**
* Constructor
*
*/
- public ParseNode (int number)
+ public ParseNode ()
{
- super(number);
-
this.name_ = new String("Uninitialized");
}
diff --git a/java/src/RemoveNode.java b/java/src/RemoveNode.java
index 43744394a7b..b613d981ee5 100644
--- a/java/src/RemoveNode.java
+++ b/java/src/RemoveNode.java
@@ -18,13 +18,11 @@ package JACE.ServiceConfigurator;
import java.io.*;
import JACE.OS.*;
-import java_cup.runtime.*;
class RemoveNode extends ParseNode
{
- public RemoveNode (int act_num)
+ public RemoveNode ()
{
- super(act_num);
}
public void apply ()
diff --git a/java/src/ResumeNode.java b/java/src/ResumeNode.java
index 49b7f5a2b62..055c19da408 100644
--- a/java/src/ResumeNode.java
+++ b/java/src/ResumeNode.java
@@ -17,13 +17,11 @@ package JACE.ServiceConfigurator;
import java.io.*;
import JACE.OS.*;
-import java_cup.runtime.*;
class ResumeNode extends ParseNode
{
- public ResumeNode (int act_num)
+ public ResumeNode ()
{
- super(act_num);
}
public void apply ()
diff --git a/java/src/SOCKAcceptor.java b/java/src/SOCKAcceptor.java
index aaca725426a..f94d037d462 100644
--- a/java/src/SOCKAcceptor.java
+++ b/java/src/SOCKAcceptor.java
@@ -101,6 +101,7 @@ public class SOCKAcceptor
/**
* Clean up when the garbage collector gets run (if at all). Note
* that there is no guarantee that finalize () will get called.
+ *@exception Throwable (Probably IOException from the socket level)
*/
protected void finalize () throws Throwable
{
diff --git a/java/src/SOCKStream.java b/java/src/SOCKStream.java
index 638482d8e40..017c2e0e24e 100644
--- a/java/src/SOCKStream.java
+++ b/java/src/SOCKStream.java
@@ -194,6 +194,7 @@ public class SOCKStream
/**
* Cleanup when the SOCK Stream is garbage collected.
+ *@exception Throwable (Probably IOException from the socket level)
*/
protected void finalize () throws Throwable
{
diff --git a/java/src/ServiceConfig.java b/java/src/ServiceConfig.java
index 11504527bdd..e4d5b966d5f 100644
--- a/java/src/ServiceConfig.java
+++ b/java/src/ServiceConfig.java
@@ -6,8 +6,8 @@
* = FILENAME
* ServiceConfig.java
*
- * Services can be suspended, resumed, removed, and reloaded. Reloading requires that
- * the user calls a prepareForReload method after removing a service. You can't access
+ * Services can be suspended, resumed, removed, and reloaded. Reloading requires a
+ * call to prepareForReload method after removing a service (done in remove()). You can't access
* the ServiceObjects that are loaded directly -- anything loaded with a class loader
* must be wrapped and have its methods called via reflection. This is because a
* loaded class doesn't exist in the same space as one loaded with the system loader.
@@ -35,9 +35,13 @@ import JACE.Misc.*;
public class ServiceConfig
{
/** Begins the process of loading a service configurator file:
- * parses the command line and calls either loadOldConfigFile or
- * processDirectives depending on whether or not the user wants
- * to try to load a C++ svc.conf file.
+ * parses the command line and calls processDirectives
+ *
+ *@exception FileNotFoundException Couldn't find service config file
+ *@exception IOException Problem reading or parsing
+ *@exception ClassNotFoundException Couldn't find a certain class
+ *@exception IllegalAccessException Inappropriate method call on a class
+ *@exception InstantiationException Couldn't create a certain class instance
*/
public static int open (String [] args) throws FileNotFoundException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException
{
@@ -50,10 +54,7 @@ public class ServiceConfig
if (ServiceConfig.loader_ == null)
ServiceConfig.loader_ = new ServiceLoader();
- if (ServiceConfig.oldConfigFormat_)
- return ServiceConfig.loadOldConfigFile();
- else
- return ServiceConfig.processDirectives ();
+ return ServiceConfig.processDirectives ();
}
@@ -62,13 +63,12 @@ public class ServiceConfig
* -b Run as a daemon (not implemented yet)
* -d Debug mode
* -n No defaults
- * -o Attempt to load a C++ ACE service config file
* -f <filename> Load services in the given file [see below for info]
*
*/
protected static void parseArgs (String [] args)
{
- GetOpt getopt = new GetOpt (args, "bdnf:o:");
+ GetOpt getopt = new GetOpt (args, "bdnf:");
for (int c; (c = getopt.next ()) != -1; )
switch (c)
{
@@ -82,9 +82,6 @@ public class ServiceConfig
case 'n':
ServiceConfig.noDefaults_ = true;
break;
- case 'o':
- ServiceConfig.oldConfigFormat_ = true;
- break;
case 'f':
ServiceConfig.serviceConfigFile_ = getopt.optarg ();
break;
@@ -111,11 +108,16 @@ public class ServiceConfig
}
/** Called by ParseNode subclass
- * Asks the Service Repository to remove a serivce
+ * Asks the Service Repository to remove a service, also calls
+ * prepareForReload so the user doesn't have to.
*/
public static int remove (String name)
{
- return svcRep_.remove(name);
+ int result = svcRep_.remove(name);
+
+ prepareForReload();
+
+ return result;
}
/** Should be called before the user wants to reload
@@ -136,9 +138,8 @@ public class ServiceConfig
/**
* Parse a service configurator file, creating classes as necessary
*
- * This is getting too complicated -- since CUP and JLex are available, it would be nice to
- * develop a grammar for this. Unfortunately, there may be file problems when trying to get
- * CUP and JLex to produce more than one parser per program.
+ * This is getting complicated, but there were too many installation problems when using
+ * CUP and JLex to merit developing a grammar.
*
* Current formats:
*
@@ -148,6 +149,11 @@ public class ServiceConfig
* suspend <Service Name>
* remove <Service Name>
*
+ *@exception FileNotFoundException Couldn't find the file (default "svc.conf")
+ *@exception IOException Problem reading/parsing
+ *@exception ClassNotFoundException Couldn't find a certain class
+ *@exception IllegalAccessException Inappropriate method call
+ *@exception InstantiationException Couldn't create a class instance
*/
protected static int processDirectives () throws FileNotFoundException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException
{
@@ -207,16 +213,16 @@ public class ServiceConfig
// This is a hack, but it should work until CUP is easier
// to deal with when multiple parsers are needed
if (commandName.equals("load"))
- result = new AddServiceObjectNode(0);
+ result = new AddServiceObjectNode();
else
if (commandName.equals("remove"))
- result = new RemoveNode(0);
+ result = new RemoveNode();
else
if (commandName.equals("suspend"))
- result = new SuspendNode(0);
+ result = new SuspendNode();
else
if (commandName.equals("resume"))
- result = new ResumeNode(0);
+ result = new ResumeNode();
else
throw new IOException ("COMMAND NAME missing or invalid: " + commandName);
@@ -293,26 +299,6 @@ public class ServiceConfig
return 0;
}
- /** Parses the svc.conf file, treating it as a C++ ACE svc.conf file.
- * This will involve attempts to infer the class name from
- * the service initializer path, and isn't very accurate.
- */
- public static int loadOldConfigFile ()
- {
- parser ps = new parser();
-
- try {
-
- ps.parse();
-
- } catch (Exception e) {
- ACE.ERROR("Error: " + e);
- return -1;
- }
-
- return 0;
- }
-
/**
* This is called when apply() is called on AddServiceObjectNodes. Similar
@@ -324,47 +310,14 @@ public class ServiceConfig
{
Class c = null;
- if (ServiceConfig.oldConfigFormat_) {
-
- // Generate a lot of possible file locations and names
- ClassNameGenerator cng = new ClassNameGenerator(son.locator());
- String attempt = null;
- boolean ready = false;
-
-
- // Try to load the class based on the names we can infer from
- // the C++ svc.conf line
- while ((cng.hasMoreElements()) && (!ready)) {
- try {
-
- attempt = (String)cng.nextElement();
-
- c = loader_.loadClass(attempt, true);
-
- ready = true;
-
- } catch (ClassNotFoundException e) { }
-
- }
-
- // Couldn't find the class
- if (!ready) {
- ACE.ERROR("Can't find class with locator: " + son.locator());
- return -1;
- }
-
- } else {
-
- try {
+ try {
- c = loader_.loadClass(son.locator(), true);
+ c = loader_.loadClass(son.locator(), true);
- } catch (ClassNotFoundException e) {
- ACE.ERROR("Can't find class with locator: " + son.locator());
- return 01;
- }
-
- }
+ } catch (ClassNotFoundException e) {
+ ACE.ERROR("Can't find class with locator: " + son.locator());
+ return -1;
+ }
try {
@@ -396,7 +349,6 @@ public class ServiceConfig
}
// Set by command line options
- private static boolean oldConfigFormat_ = false;
private static boolean beADaemon_ = false;
private static boolean debug_ = false;
private static boolean noDefaults_ = false;
diff --git a/java/src/ServiceLoader.java b/java/src/ServiceLoader.java
index 427428c5ae2..540f72b07b7 100644
--- a/java/src/ServiceLoader.java
+++ b/java/src/ServiceLoader.java
@@ -58,6 +58,7 @@ public class ServiceLoader extends ClassLoader
/**
* Load a class from across the network
+ *@exception ClassNotFoundException Couldn't find the class
*/
public Class loadClass (URL url, boolean resolve) throws ClassNotFoundException
{
@@ -106,6 +107,7 @@ public class ServiceLoader extends ClassLoader
* Java space, though, so it's impossible to cast them
* to something useful. Use a wrapper and reflection
* as in ServiceRecords.
+ *@exception ClassNotFoundException Couldn't find the class
*/
public Class loadClass (String fn, boolean resolve) throws ClassNotFoundException
{
diff --git a/java/src/ServiceRepository.java b/java/src/ServiceRepository.java
index 29c90a77313..4624b36e3f9 100644
--- a/java/src/ServiceRepository.java
+++ b/java/src/ServiceRepository.java
@@ -7,8 +7,8 @@
* ServiceRepository.java
*
* The service repository stores the network services, allowing them to be removed, suspended,
- * resumed, etc. To reload a service, the caller must remove it from the repository and then
- * call prepareForReload().
+ * resumed, etc. To reload a service, ServiceConfig.prepareForReload() must be called. This is
+ * already done in the ServiceConfig.remove method.
*
*@see JACE.ServiceConfigurator.ServiceRecord;
*@see JACE.ServiceConfigurator.ServiceConfig;
@@ -116,9 +116,9 @@ public class ServiceRepository
/** Take the given service out of the repository. This also sets the
* reference in the repository to null to ensure there are no
- * hidden references to the old ServiceObject. To reload, the user must
- * still run prepareToReload on ServiceConfig if they don't want any
- * problems.
+ * hidden references to the old ServiceObject. To reload, the
+ * ServiceConfig.prepareToReload method must be called. This is already
+ * done in the ServiceConfig.remove method.
*/
public int remove (String name)
{
diff --git a/java/src/StrategyAcceptor.java b/java/src/StrategyAcceptor.java
index 07f81a8ad63..d73c7b93006 100644
--- a/java/src/StrategyAcceptor.java
+++ b/java/src/StrategyAcceptor.java
@@ -57,6 +57,7 @@ public class StrategyAcceptor
* Initialize the Strategy Acceptor. The method creates the
* appropriate strategies as needed.
*@param port port number where the server will listen for connections
+ *@exception IOException Socket level error
*/
public void open (int port) throws IOException
{
@@ -72,6 +73,11 @@ public class StrategyAcceptor
/**
* Accept a connection using the appropriate strategies.
+ *
+ *@exception SocketException Socket level error
+ *@exception InstantiationException Problem creating a handler
+ *@exception IllegalAccessException No strategy available
+ *@exception IOException Socket level error
*/
public void accept () throws SocketException,
InstantiationException,
@@ -94,9 +100,10 @@ public class StrategyAcceptor
* creStrategy_. If no strategy is passed in, the default behavior
* of this method is to use the default CreationStrategy.
*@return a new instance of the Svc Handler
+ *@exception InstantiationException Couldn't create SvcHandler
+ *@exception IllegalAccessException No strategy available
*/
- protected SvcHandler makeSvcHandler () throws InstantiationException,
- IllegalAccessException
+ protected SvcHandler makeSvcHandler () throws InstantiationException, IllegalAccessException
{
// Create a new handler for the connection
return this.creStrategy_.makeSvcHandler ();
@@ -111,9 +118,10 @@ public class StrategyAcceptor
* use the default AcceptStrategy.
*@param sh Svc Handler in which to accept the connection
*@return result of accepting a connection using the accept strategy
+ *@exception SocketException Socket level error
+ *@exception IOException Socket level error
*/
- protected int acceptSvcHandler (SvcHandler sh) throws
- SocketException, IOException
+ protected int acceptSvcHandler (SvcHandler sh) throws SocketException, IOException
{
// Delegate responsibility to the appropriate strategy
return this.acceptStrategy_.acceptSvcHandler (sh);
diff --git a/java/src/SuspendNode.java b/java/src/SuspendNode.java
index 52faab4ac05..5b16a368458 100644
--- a/java/src/SuspendNode.java
+++ b/java/src/SuspendNode.java
@@ -17,13 +17,11 @@ package JACE.ServiceConfigurator;
import java.io.*;
import JACE.OS.*;
-import java_cup.runtime.*;
class SuspendNode extends ParseNode
{
- public SuspendNode (int act_num)
+ public SuspendNode ()
{
- super(act_num);
}
public void apply ()
diff --git a/java/src/Task.java b/java/src/Task.java
index 065e7869fef..24ed6a7eb07 100644
--- a/java/src/Task.java
+++ b/java/src/Task.java
@@ -233,6 +233,7 @@ public abstract class Task implements Runnable, EventHandler
* Insert message into the message queue.
*@param mb Message Block to insert into the Message Queue
*@param tv amount of time to wait for
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
protected int putq (MessageBlock mb, TimeValue tv) throws InterruptedException
{
@@ -243,6 +244,7 @@ public abstract class Task implements Runnable, EventHandler
* Extract the first message from the queue. Note that the call is blocking.
*@return the first Message Block from the Message Queue.
*@param tv amount of time to wait for
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
protected MessageBlock getq (TimeValue tv) throws InterruptedException
{
@@ -253,6 +255,7 @@ public abstract class Task implements Runnable, EventHandler
* Return a message back to the queue.
*@param mb Message Block to return back to the Message Queue
*@param tv amount of time to wait for
+ *@exception java.lang.InterruptedException Interrupted while accessing queue
*/
protected int ungetq (MessageBlock mb, TimeValue tv) throws InterruptedException
{
diff --git a/java/src/TimedWait.java b/java/src/TimedWait.java
index acf771dfca1..e8402e96991 100644
--- a/java/src/TimedWait.java
+++ b/java/src/TimedWait.java
@@ -43,6 +43,7 @@ public abstract class TimedWait
* overrides it.
* IMPORTANT: This method assumes it is called with the object_'s
* monitor lock already held.
+ *@exception InterruptedException Interrupted during wait
*/
public final void timedWait () throws InterruptedException
{
@@ -70,6 +71,8 @@ public abstract class TimedWait
* IMPORTANT: This method assumes it is called with the object_'s
* monitor lock already held.
*@param tv Amount of time to do wait for.
+ *@exception java.lang.InterruptedException Interrupted during wait
+ *@exception JACE.ASX.TimeoutException Reached timeout specified
*/
public final void timedWait (TimeValue tv)
throws InterruptedException,