diff options
Diffstat (limited to 'libjava/classpath/java/rmi/activation')
11 files changed, 207 insertions, 207 deletions
diff --git a/libjava/classpath/java/rmi/activation/Activatable.java b/libjava/classpath/java/rmi/activation/Activatable.java index 6977d984c54..9ec7cad48d9 100644 --- a/libjava/classpath/java/rmi/activation/Activatable.java +++ b/libjava/classpath/java/rmi/activation/Activatable.java @@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -63,10 +63,10 @@ import java.rmi.server.UnicastRemoteObject; * parameter being the {@link ActivationID} and the second the * {@link MarshalledObject}. Activatable is the main class that developers need * to use to implement and manage activatable objects. It also contains methods - * for making activatable remote objects that are not derived from the + * for making activatable remote objects that are not derived from the * Activatable class. - * - * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) + * + * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) */ public abstract class Activatable extends RemoteServer @@ -76,12 +76,12 @@ public abstract class Activatable * Use SVUID for interoperability. */ static final long serialVersionUID = - 3120617863591563455L; - + /** * The object activation id. */ final ActivationID id; - + /** * This constructor is used to register export the object on the given port. A * subclass of the Activatable class calls this constructor to register and @@ -90,7 +90,7 @@ public abstract class Activatable * with the activation system and "exported" (on an anonymous port, if port is * zero) to the RMI runtime so that it is available to accept incoming calls * from clients. - * + * * @param codebase the object code base url * @param data the data, needed to activate the object. * @param restart specifies reactivation mode after crash. If true, the object @@ -118,7 +118,7 @@ public abstract class Activatable * additionally specifying the socket factories. A subclass of the Activatable * class calls this constructor to register and export the object during * initial construction. - * + * * @param codebase the object code base url * @param data the data, needed to activate the object. * @param restart specifies reactivation mode after crash. If true, the object @@ -151,7 +151,7 @@ public abstract class Activatable * "activation" constructor with the two parameters ({@link ActivationID}, * {@link MarshalledObject}). As a side effect, the object is exported and is * available to accept incoming calls. - * + * * @param anId the activation id * @param port the port, on which the activatable will be listening * @throws RemoteException if the activation failed. @@ -166,7 +166,7 @@ public abstract class Activatable catch (Exception e) { e.printStackTrace(); - RemoteException acex = + RemoteException acex = new RemoteException("cannot export Activatable", e); throw acex; } @@ -180,12 +180,12 @@ public abstract class Activatable * "activation" constructor with the two parameters ({@link ActivationID}, * {@link MarshalledObject}). As a side effect, the object is exported and is * available to accept incoming calls. - * + * * @param anId the activation id * @param port the port, on which the activatable will be listening * @param csf the client socket factory * @param ssf the server socket factory - * + * * @throws RemoteException if the remote call failed */ protected Activatable(ActivationID anId, int port, RMIClientSocketFactory csf, @@ -203,17 +203,17 @@ public abstract class Activatable throw acex; } } - + /** * Get the objects activation identifier. - * + * * @return the object activation identifier */ protected ActivationID getID() { return id; } - + /** * Obtain the activation Id from the activation descriptor by registering * within the current group. @@ -230,11 +230,11 @@ public abstract class Activatable system = ActivationGroup.currentGroupID().getSystem(); return system.registerObject(descriptor); } - + /** * This method registers an activatable object. The object is expected to be * on the anonymous port (null client and server socket factories). - * + * * @param desc the object description. * @return the remote stub for the activatable object (the first call on this * stub will activate the object). @@ -258,12 +258,12 @@ public abstract class Activatable throw new ActivationException("Class not found: "+desc.getClassName()); } } - + /** * Inactivates and unexports the object. The subsequent calls will activate * the object again. The object is not inactivated if it is currently * executing calls. - * + * * @param id the id of the object being inactivated * @return true if the object has been inactivated, false if it has not been * inactivated because of the running or pending calls. @@ -278,10 +278,10 @@ public abstract class Activatable id.group.inactiveObject(id); return UnicastRemoteObject.unexportObject(id.activate(false), false); } - + /** * Unregister the object (the object will no longer be activable with that id) - * + * * @param id the object id * @throws UnknownObjectException if the id is unknown * @throws ActivationException if the activation system is not running @@ -293,23 +293,23 @@ public abstract class Activatable ActivationGroup.currentGroupId.getSystem().unregisterObject(id); UnicastServer.unregisterActivatable(id); } - + /** * Register and export the object that activatable object that is not derived * from the Activatable super class. It creates and registers the object * activation descriptor. There is no need to call this method if the object * extends Activable, as its work is done in the constructor * {@link #Activatable(String, MarshalledObject, boolean, int)}. - * + * * @param obj the object, that is exported, becoming available at the given * port. * @param location the object code location (codebase). * @param data the data, needed to activate the object * @param restart the restart mode * @param port the port, where the object will be available - * + * * @return the created object activation ID. - * + * * @throws ActivationException if the activation group is not active * @throws RemoteException if the registration or export fails */ @@ -321,7 +321,7 @@ public abstract class Activatable ActivationDesc descriptor = new ActivationDesc(obj.getClass().getName(), location, data, restart); ActivationID id = obtainId(descriptor); - Remote stub = exportObject(obj, id, port); + Remote stub = exportObject(obj, id, port); return id; } @@ -331,7 +331,7 @@ public abstract class Activatable * activation descriptor. There is no need to call this method if the object * extends Activable, as its work is done in the constructor * {@link #Activatable(String, MarshalledObject, boolean, int, RMIClientSocketFactory, RMIServerSocketFactory)} - * + * * @param obj the object, that is exported, becoming available at the given * port. * @param location the object code location (codebase). @@ -340,9 +340,9 @@ public abstract class Activatable * @param port the port, where the object will be available * @param csf the client socket factory * @param ssf the server socket factory - * + * * @return the created object activation ID. - * + * * @throws ActivationException if the activation group is not active * @throws RemoteException if the registration or export fails */ @@ -356,7 +356,7 @@ public abstract class Activatable ActivationDesc descriptor = new ActivationDesc(obj.getClass().getName(), location, data, restart); ActivationID id = obtainId(descriptor); - Remote stub = exportObject(obj, id, port, csf, ssf); + Remote stub = exportObject(obj, id, port, csf, ssf); return id; } @@ -367,13 +367,13 @@ public abstract class Activatable * class. There is no need to call this method if the object extends * Activable, as its work is done in the constructor * {@link #Activatable(ActivationID, int)} - * + * * @param obj the object * @param id the known activation id * @param port the object port - * + * * @return the remote stub of the activatable object - * + * * @throws RemoteException if the object export fails */ public static Remote exportObject(Remote obj, ActivationID id, int port) @@ -389,15 +389,15 @@ public abstract class Activatable * class. There is no need to call this method if the object extends * Activable, as its work is done in the constructor * {@link #Activatable(ActivationID, int)} - * + * * @param obj the object * @param id the known activation id * @param port the object port * @param csf the client socket factory * @param ssf the server socket factory - * + * * @return the remote stub of the activatable object - * + * * @throws RemoteException if the object export fails */ public static Remote exportObject(Remote obj, ActivationID id, int port, @@ -405,7 +405,7 @@ public abstract class Activatable RMIServerSocketFactory ssf) throws RemoteException { - Remote stub = export(id, obj, port, ssf); + Remote stub = export(id, obj, port, ssf); return stub; } @@ -414,7 +414,7 @@ public abstract class Activatable * Make the remote object unavailable for incoming calls. This method also * unregisters the object, so it cannot be activated again by incoming call * (unless registered). - * + * * @param obj the object to unexport * @param force if true, cancel all pending or running calls to that object * (if false, the object with such calls is not unexported and false @@ -426,7 +426,7 @@ public abstract class Activatable throws NoSuchObjectException { Object aref = UnicastServer.getExportedRef(obj); - + // Unregister it also (otherwise will be activated during the subsequent // call. if (aref instanceof ActivatableServerRef) @@ -436,9 +436,9 @@ public abstract class Activatable } return UnicastRemoteObject.unexportObject(obj, force); } - - static Remote exportObject(Remote obj, int port, - RMIServerSocketFactory serverSocketFactory) + + static Remote exportObject(Remote obj, int port, + RMIServerSocketFactory serverSocketFactory) throws RemoteException { UnicastServerRef sref = null; @@ -449,52 +449,52 @@ public abstract class Activatable sref = new UnicastServerRef(new ObjID(), port, serverSocketFactory); Remote stub = sref.exportObject(obj); - // addStub(obj, stub); + // addStub(obj, stub); // TODO Need to change the place of the stub repository return stub; } - + /** * Create and export the new remote object, making it available at the given * port, using sockets, produced by the specified factories. - * + * * @param port the port, on that the object should become available. Zero * means anonymous port. * @param serverSocketFactory the server socket factory */ private static Remote export(ActivationID id, Remote obj, int port, - RMIServerSocketFactory serverSocketFactory) + RMIServerSocketFactory serverSocketFactory) throws RemoteException { ActivatableServerRef sref = null; sref = new ActivatableServerRef(makeId(id), id, port, serverSocketFactory); return sref.exportObject(obj); - } - + } + /** * Make the object ID from the activation ID. The same activation ID always * produces the identical object id. - * + * * @param aid the activation id - * + * * @return the object id */ private static ObjID makeId(ActivationID aid) { ObjID id = new ObjID(0); - + // The fields of both ObjID and ActivationID must be package private, // so we need to use the reflection to access them anyway. // Probably other implementations use some very different approach. - + try { Field idUid = ObjID.class.getDeclaredField("space"); Field aidUid = ActivationID.class.getDeclaredField("uid"); - + aidUid.setAccessible(true); idUid.setAccessible(true); - + idUid.set(id, aidUid.get(aid)); } catch (Exception e) @@ -503,10 +503,10 @@ public abstract class Activatable ierr.initCause(e); throw ierr; } - + return id; - } - + } + /** * Connect the object to the UnicastServer (export), but not activate it. * The object will be activated on the first call. @@ -515,7 +515,7 @@ public abstract class Activatable { try { - ActivatableServerRef asr = + ActivatableServerRef asr = new ActivatableServerRef(makeId(anId), anId, 0, null); UnicastServer.exportActivatableObject(asr); return asr.exportClass(stubFor); diff --git a/libjava/classpath/java/rmi/activation/ActivationDesc.java b/libjava/classpath/java/rmi/activation/ActivationDesc.java index ae2b78eca8e..9970cd63b63 100644 --- a/libjava/classpath/java/rmi/activation/ActivationDesc.java +++ b/libjava/classpath/java/rmi/activation/ActivationDesc.java @@ -1,13 +1,13 @@ /* ActivationDesc.java -- record with info to activate an object Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - + This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -51,8 +51,8 @@ import java.rmi.MarshalledObject; * <li>the object restart mode</li> * <li>the object specific intialization information</li> * </ul> - * - * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) + * + * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) */ public final class ActivationDesc implements Serializable @@ -89,8 +89,8 @@ public final class ActivationDesc /** * Create the new activation description, assuming the object group is the - * {@link ActivationGroup#currentGroupID()}. - * + * {@link ActivationGroup#currentGroupID()}. + * * @param className the object fully qualified class name * @param location the code base URL * @param data the object initialization data, contained in a marshalled form @@ -103,8 +103,8 @@ public final class ActivationDesc /** * Create the new activation description, assuming the object group is the - * {@link ActivationGroup#currentGroupID()}. - * + * {@link ActivationGroup#currentGroupID()}. + * * @param className the object fully qualified class name * @param location the code base URL * @param data the object initialization data, contained in a marshalled form @@ -124,7 +124,7 @@ public final class ActivationDesc /** * Create the new activation description. Under crash, the object will only * be reactivated on demand. - * + * * @param groupID the object group id. * @param className the object fully qualified class name * @param location the code base URL @@ -138,7 +138,7 @@ public final class ActivationDesc /** * Create the new activation description, providing full information. - * + * * @param groupID the object group id. * @param className the object fully qualified class name * @param location the code base URL @@ -166,7 +166,7 @@ public final class ActivationDesc /** * Get the class name of the object being activated - * + * * @return the fully qualified class name of the object being activated */ public String getClassName() @@ -176,7 +176,7 @@ public final class ActivationDesc /** * Get the code location URL ("codebase") of the object being activated. - * + * * @return the codebase of the object being activated. */ public String getLocation() @@ -191,7 +191,7 @@ public final class ActivationDesc /** * Get the object reactivation strategy after crash. - * + * * @return true ir the object is activated when activator is restarted or the * activation group is restarted. False if the object is only * activated on demand. This flag does has no effect during the normal @@ -201,10 +201,10 @@ public final class ActivationDesc { return restart; } - + /** * Compare this object with another activation description for equality. - * + * * @return true if all fields have the equal values, false otherwise. */ public boolean equals(Object obj) @@ -213,25 +213,25 @@ public final class ActivationDesc { ActivationDesc that = (ActivationDesc) obj; return eq(groupid, that.groupid) && - eq(classname, that.classname) && - eq(location, that.location) && + eq(classname, that.classname) && + eq(location, that.location) && eq(data, that.data) && restart == that.restart; } else return false; } - + /** * Get the hash code of this object (overridden to make the returned value * consistent with .equals(..). */ public int hashCode() { - return hash(groupid) ^ hash(classname) ^ + return hash(groupid) ^ hash(classname) ^ hash(location) ^ hash(data); } - + /** * Get the hashcode of x or 0 if x == null. */ @@ -239,7 +239,7 @@ public final class ActivationDesc { return x == null ? 0 : x.hashCode(); } - + /** * Compare by .equals if both a and b are not null, compare directly if at * least one of them is null. diff --git a/libjava/classpath/java/rmi/activation/ActivationGroup.java b/libjava/classpath/java/rmi/activation/ActivationGroup.java index ad5a05d01a9..230c7145592 100644 --- a/libjava/classpath/java/rmi/activation/ActivationGroup.java +++ b/libjava/classpath/java/rmi/activation/ActivationGroup.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -50,7 +50,7 @@ import java.rmi.server.UnicastRemoteObject; /** * The entity that receives the request to activate object and activates it. * Frequently there is one activation group per virtual machine. - * + * * @author Audrius Meskauskas (audriusa@Bioinformatics.org) (from stub) */ public abstract class ActivationGroup @@ -62,12 +62,12 @@ public abstract class ActivationGroup * Use the SVUID for interoperability. */ static final long serialVersionUID = - 7696947875314805420L; - + /** * The Id of the current group on this VM (null if none). */ - static ActivationGroupID currentGroupId = null; - + static ActivationGroupID currentGroupId = null; + /** * The groups identifier. */ @@ -77,17 +77,17 @@ public abstract class ActivationGroup * The groups activation monitor. */ ActivationMonitor monitor; - + /** * The groups incarnation number. */ long incarnation; - + /** * The groups activation system. */ static ActivationSystem system; - + /** * Used during the group creation (required constructor). */ @@ -98,34 +98,34 @@ public abstract class ActivationGroup }; /** - * Create the new activation group with the given group id. - * + * Create the new activation group with the given group id. + * * @param aGroupId the group Id. - * + * * @throws RemoteException if the group export fails. */ protected ActivationGroup(ActivationGroupID aGroupId) throws RemoteException { groupId = aGroupId; } - + /** * The method is called when the object is exported. The group must notify * the activation monitor, if this was not already done before. - * + * * @param id the object activation id * @param obj the remote object implementation - * + * * @throws ActivationException if the group is inactive * @throws UnknownObjectException if such object is not known * @throws RemoteException if the call to monitor fails */ public abstract void activeObject(ActivationID id, Remote obj) throws ActivationException, UnknownObjectException, RemoteException; - + /** * Notifies the monitor about the object being inactivated. - * + * * @param id the object being inactivated. * @return true always (must be overridden to return other values). * @throws ActivationException never @@ -148,7 +148,7 @@ public abstract class ActivationGroup * {@link MarshalledObject}. The group must be first be registered with the * ActivationSystem. Once a group is created, the currentGroupID method * returns the identifier for this group until the group becomes inactive. - * + * * @param id the activation group id * @param desc the group descriptor, providing the information, necessary to * create the group @@ -165,7 +165,7 @@ public abstract class ActivationGroup // passed in the group id. if (system == null) system = id.system; - + ActivationGroup group = null; // TODO at the moment all groups are created on the current jre and the @@ -220,7 +220,7 @@ public abstract class ActivationGroup /** * Get the id of current activation group. - * + * * @return the id of the current activation group or null if none exists. */ public static ActivationGroupID currentGroupID() @@ -240,16 +240,16 @@ public abstract class ActivationGroup ierr.initCause(e); throw ierr; } - + return currentGroupId; } /** * Set the activation system for this virtual machine. The system can only - * be set if no group is active. - * + * be set if no group is active. + * * @param aSystem the system to set - * + * * @throws ActivationException if some group is active now. */ public static void setSystem(ActivationSystem aSystem) @@ -259,7 +259,7 @@ public abstract class ActivationGroup throw new ActivationException("Group active"); else { - try + try { // Register the default transient activation system and group. system = aSystem; @@ -277,9 +277,9 @@ public abstract class ActivationGroup ierr.initCause(ex); throw ierr; } - } + } } - + /** * Get the current activation system. If the system is not set via * {@link #setSystem} method, the default system for this virtual machine is @@ -293,7 +293,7 @@ public abstract class ActivationGroup * transient activation system will be created and returned. This internal * system is highly limited in in capabilities and is not intended to be used * anywhere apart automated testing. - * + * * @return the activation system for this virtual machine * @throws ActivationException */ @@ -306,7 +306,7 @@ public abstract class ActivationGroup /** * Makes the call back to the groups {@link ActivationMonitor}. - * + * * @param id the id obj the object being activated * @param mObject the marshalled object, contains the activated remote object * stub. @@ -315,24 +315,24 @@ public abstract class ActivationGroup * @throws RemoteException on remote call (to monitor) error */ protected void activeObject(ActivationID id, - MarshalledObject<? extends Remote> mObject) + MarshalledObject<? extends Remote> mObject) throws ActivationException, UnknownObjectException, RemoteException { if (monitor!=null) monitor.activeObject(id, mObject); - + id.group = this; } /** * Makes the call back to the groups {@link ActivationMonitor} and sets * the current group to null. - */ + */ protected void inactiveGroup() throws UnknownGroupException, RemoteException { if (monitor!=null) monitor.inactiveGroup(groupId, incarnation); - + if (currentGroupId!=null && currentGroupId.equals(groupId)) currentGroupId = null; } diff --git a/libjava/classpath/java/rmi/activation/ActivationGroupDesc.java b/libjava/classpath/java/rmi/activation/ActivationGroupDesc.java index bf7445f17bb..a0c88ec0aed 100644 --- a/libjava/classpath/java/rmi/activation/ActivationGroupDesc.java +++ b/libjava/classpath/java/rmi/activation/ActivationGroupDesc.java @@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -64,7 +64,7 @@ import java.util.zip.Adler32; * expectes the group class to have the two parameter constructor, the first * parameter being the {@link ActivationGroupID} and the second the * {@link MarshalledObject}. - * + * * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) */ public final class ActivationGroupDesc @@ -74,7 +74,7 @@ public final class ActivationGroupDesc * Contains the startup options for the {@link ActivationGroup} * implementations. Allows to override system properties and specify other * options for the implementation groups. - * + * * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) */ public static class CommandEnvironment @@ -85,7 +85,7 @@ public final class ActivationGroupDesc * Use the SVUID for interoperability. */ static final long serialVersionUID = 6165754737887770191L; - + /** * The zero size string array used as argv value when null is passed. */ @@ -95,15 +95,15 @@ public final class ActivationGroupDesc * The path to the java executable (or null for using default jre). */ final String command; - + /** * The extra parameters (may be empty array but never null). */ final String[] options; - + /** * Create the new command environment. - * + * * @param commandPatch the full path (and name) to the java executable of * null for using the default executable. * @param args extra options that will be used when creating the activation @@ -117,10 +117,10 @@ public final class ActivationGroupDesc else options = NO_ARGS; } - + /** * Get the path to the java executable. - * + * * @return the path to the java executable or null for using the default * jre. */ @@ -128,17 +128,17 @@ public final class ActivationGroupDesc { return command; } - + /** * Get the additional command options. - * + * * @return the command options array, may be empty string */ public String[] getCommandOptions() { return options; } - + /** * Compare for content equality. */ @@ -179,49 +179,49 @@ public final class ActivationGroupDesc return h; } } - + /** * Use the SVUID for interoperability. */ static final long serialVersionUID = - 4936225423168276595L; - + /** * The group class name or null for the default group class implementation. */ final String className; - + /** * The group class download location URL (codebase), ignored by the - * default implementation. + * default implementation. */ final String location; - + /** * The group initialization data. */ final MarshalledObject<?> data; - + /** * The path to the group jre and the parameters of this jre, may be * null for the default jre. */ final ActivationGroupDesc.CommandEnvironment env; - + /** * The properties that override the system properties. */ final Properties props; - + /** * The cached hash code. */ transient long hash; - + /** * Create the new activation group descriptor that will use the default * activation group implementation with the given properties and * environment. - * + * * @param aProperties the properties that override the system properties * @param environment the command line (and parameters), indicating, where to * find the jre executable and with that parameters to call it. May @@ -235,10 +235,10 @@ public final class ActivationGroupDesc this(DefaultActivationGroup.class.getName(), null, null, aProperties, environment); } - + /** * Create the new activation group descriptor. - * + * * @param aClassName the name of the group implementation class. The null * value indicates the default implementation. * @param aLocation the location, from where the group implementation class @@ -261,20 +261,20 @@ public final class ActivationGroupDesc props = aProperties; env = environment; } - + /** * Get the activation group class name. - * + * * @return the activation group class name (null for default implementation) */ public String getClassName() { return className; } - + /** * Get the location, from where the group class will be loaded - * + * * @return the location, from where the implementation should be loaded (null * for the default implementation) */ @@ -282,10 +282,10 @@ public final class ActivationGroupDesc { return location; } - + /** * Get the group intialization data. - * + * * @return the group intialization data in the marshalled form. */ public MarshalledObject<?> getData() @@ -295,18 +295,18 @@ public final class ActivationGroupDesc /** * Get the overridded system properties. - * + * * @return the overridden group system properties. */ public Properties getPropertyOverrides() { return props; } - + /** * Get the group command environment, containing path to the jre executable * and startup options. - * + * * @return the command environment or null if the default environment should * be used. */ @@ -314,7 +314,7 @@ public final class ActivationGroupDesc { return env; } - + /** * Compare for the content equality. */ @@ -366,7 +366,7 @@ public final class ActivationGroupDesc else return false; } - + /** * Compare for direct equality if one or both parameters are null, otherwise * call .equals. @@ -378,7 +378,7 @@ public final class ActivationGroupDesc else return a.equals(b); } - + /** * Return the hashcode. */ @@ -401,11 +401,11 @@ public final class ActivationGroupDesc if (props!=null) { Enumeration en = props.propertyNames(); - + // Using the intermediate sorted set to ensure that the // properties are sorted. TreeSet pr = new TreeSet(); - + Object key; Object value; while (en.hasMoreElements()) @@ -414,7 +414,7 @@ public final class ActivationGroupDesc if (key!=null) pr.add(key); } - + Iterator it = pr.iterator(); while (it.hasNext()) { diff --git a/libjava/classpath/java/rmi/activation/ActivationGroupID.java b/libjava/classpath/java/rmi/activation/ActivationGroupID.java index e54b2a05d8d..77fa4fba174 100644 --- a/libjava/classpath/java/rmi/activation/ActivationGroupID.java +++ b/libjava/classpath/java/rmi/activation/ActivationGroupID.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -45,7 +45,7 @@ import java.rmi.server.UID; * This identifier identifies the activation group inside the scope of its * activation system. It also contains (and can provide) the reference to the * groups activation system. - * + * * @see ActivationSystem#registerGroup(ActivationGroupDesc) */ public class ActivationGroupID @@ -60,7 +60,7 @@ public class ActivationGroupID * The associated activation system. */ final ActivationSystem system; - + /** * The object identifier, making the ID unique. */ @@ -69,7 +69,7 @@ public class ActivationGroupID /** * Create the new activation group id in the scope of the given activation * system - * + * * @param aSystem the activation system */ public ActivationGroupID(ActivationSystem aSystem) @@ -80,7 +80,7 @@ public class ActivationGroupID /** * Get the associated activation system - * + * * @return the associated activation system */ public ActivationSystem getSystem() @@ -110,7 +110,7 @@ public class ActivationGroupID else return false; } - + /** * Get the string representation */ diff --git a/libjava/classpath/java/rmi/activation/ActivationID.java b/libjava/classpath/java/rmi/activation/ActivationID.java index e1cc8a712e1..f89a0edf891 100644 --- a/libjava/classpath/java/rmi/activation/ActivationID.java +++ b/libjava/classpath/java/rmi/activation/ActivationID.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -57,7 +57,7 @@ import java.rmi.server.UID; * </ul> * An instance of the ActivationID has the {@link UID} as its component and * hence is globally unique. - * + * * @author Audrius Meskauskas (audriusa@bioinformatics.org) (from stub) */ public class ActivationID @@ -72,12 +72,12 @@ public class ActivationID * The activator. */ transient Activator activator; - + /** * The UID, making this instance unique. */ - transient UID uid; - + transient UID uid; + /** * The activation group that has activated the object with this * activation id. The field is filled in inside the group and is used @@ -87,7 +87,7 @@ public class ActivationID /** * Create a new instance with the given activator. - * + * * @param an_activator tha activator that should activate the object. */ public ActivationID(Activator an_activator) @@ -95,10 +95,10 @@ public class ActivationID activator = an_activator; uid = new UID(); } - + /** * Activate the object. - * + * * @param force if true, always contact the group. Otherwise, the cached value * may be returned. * @return the activated object @@ -116,7 +116,7 @@ public class ActivationID catch (IOException e) { ActivationException acex = new ActivationException("id "+uid, e); - throw acex; + throw acex; } catch (ClassNotFoundException e) { @@ -124,7 +124,7 @@ public class ActivationID throw acex; } } - + /** * Returns the hash code of the activator. */ @@ -132,7 +132,7 @@ public class ActivationID { return uid == null ? 0 : uid.hashCode(); } - + /** * Compares the activators for equality. */ @@ -146,12 +146,12 @@ public class ActivationID else return false; } - + /** * Read the object from the input stream. - * + * * @param in the stream to read from - * + * * @throws IOException if thrown by the stream * @throws ClassNotFoundException */ @@ -161,10 +161,10 @@ public class ActivationID uid = (UID) in.readObject(); activator = (Activator) in.readObject(); } - + /** * Write the object to the output stream. - * + * * @param out the stream to write int * @throws IOException if thrown by the stream * @throws ClassNotFoundException @@ -175,7 +175,7 @@ public class ActivationID out.writeObject(uid); out.writeObject(activator); } - + /** * Compare by .equals if both a and b are not null, compare directly if at * least one of them is null. @@ -186,7 +186,7 @@ public class ActivationID return a == b; else return a.equals(b); - } + } /** * Return the content based string representation. @@ -195,5 +195,5 @@ public class ActivationID { return uid.toString(); } - + } diff --git a/libjava/classpath/java/rmi/activation/ActivationInstantiator.java b/libjava/classpath/java/rmi/activation/ActivationInstantiator.java index 3f4b557cb91..e4ea5415141 100644 --- a/libjava/classpath/java/rmi/activation/ActivationInstantiator.java +++ b/libjava/classpath/java/rmi/activation/ActivationInstantiator.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -45,7 +45,7 @@ import java.rmi.RemoteException; /** * The implementation of this interface creates (instantiates) the new remote * objects in response to the activation request. The instantiator is returned - * by the {@link ActivationGroup} that calls + * by the {@link ActivationGroup} that calls * {@link ActivationSystem#activeGroup(ActivationGroupID, ActivationInstantiator, long)}. */ public interface ActivationInstantiator @@ -60,7 +60,7 @@ public interface ActivationInstantiator * <li>Creates an instance of the object using its special two parameter * activation constructor, the first parameter being the {@link ActivationID} * and the second the {@link MarshalledObject}.</li> - * + * * @param id the id of the object being instantiated * @param desc the activation descriptor being instantiated * @return the MarshalledObject, containing the stub to the newly created diff --git a/libjava/classpath/java/rmi/activation/ActivationMonitor.java b/libjava/classpath/java/rmi/activation/ActivationMonitor.java index 93def8c441a..7c4c17144f4 100644 --- a/libjava/classpath/java/rmi/activation/ActivationMonitor.java +++ b/libjava/classpath/java/rmi/activation/ActivationMonitor.java @@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -44,9 +44,9 @@ import java.rmi.Remote; import java.rmi.RemoteException; /** - * The activation and inactivation event listener. The group obtains this + * The activation and inactivation event listener. The group obtains this * listener via {@link ActivationSystem#activeGroup} and must notify it - * when the group objects are activated or inactivated and also when the + * when the group objects are activated or inactivated and also when the * whole group becomes inactive. * @author root. */ @@ -54,7 +54,7 @@ public interface ActivationMonitor extends Remote { /** * Informs that the object is now active. - * + * * @param id the activation id of the object that is now active * @throws UnknownObjectException is such object is not known in this group * @throws RemoteException if remote call fails @@ -64,7 +64,7 @@ public interface ActivationMonitor extends Remote /** * Informs that the object is not inactive. - * + * * @param id the activation id of the object that is now inactive * @throws UnknownObjectException is such object is not known in this group * @throws RemoteException if remote call fails @@ -76,7 +76,7 @@ public interface ActivationMonitor extends Remote * Informs that the whole group is now inactive because all group objects are * inactive. The group will be recreated upon the later request to activate * any object, belonging to the group. - * + * * @param groupId the group id * @param incarnation the group incarnation number * @throws UnknownGroupException if the group id is not known diff --git a/libjava/classpath/java/rmi/activation/ActivationSystem.java b/libjava/classpath/java/rmi/activation/ActivationSystem.java index 719676445f8..090ce48154d 100644 --- a/libjava/classpath/java/rmi/activation/ActivationSystem.java +++ b/libjava/classpath/java/rmi/activation/ActivationSystem.java @@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -66,13 +66,13 @@ public interface ActivationSystem * . */ int SYSTEM_PORT = 1098; - + /** * Registers the activation descriptor and creates (and returns) its * activation identifier. The map entry (identifier to descriptor) is stored * in the stable map and used when the {@link Activator} receives the request * to activate the object. - * + * * @param desc the activation descriptor to register. * @return the created activation identifier that is mapped to the passed * descriptor. @@ -84,11 +84,11 @@ public interface ActivationSystem */ ActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteException; - + /** * Removes the stored identifier-description map entry. The object will no * longer be activable using the passed activation id - * + * * @param id the activation id to remove * @throws ActivationException if the entry removing operation failed * (database update problems, etc) @@ -97,11 +97,11 @@ public interface ActivationSystem */ void unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException; - + /** * Register the new activation group. For instance, it can be one activation * group per virtual machine. - * + * * @param groupDesc the activation group descriptor. * @return the created activation group ID for the activation group * @throws ActivationException if the group registration fails @@ -109,13 +109,13 @@ public interface ActivationSystem */ ActivationGroupID registerGroup(ActivationGroupDesc groupDesc) throws ActivationException, RemoteException; - + /** * This method is called from the {@link ActivationGroup} to inform the * ActivatinSystem that the group is now active and there is the * {@link ActivationInstantiator} for that group. This call is made internally * from the {@link ActivationGroup#createGroup}. - * + * * @param id the group id * @param group the group activation instantiator * @param incarnation the groups incarnatin number. @@ -132,7 +132,7 @@ public interface ActivationSystem /** * Removes the activation group with the given identifier. The group calls * back, informing the activator about the shutdown. - * + * * @param id the group activation id. * @throws ActivationException if the database update fails * @throws UnknownGroupException if such group is not registered @@ -140,10 +140,10 @@ public interface ActivationSystem */ void unregisterGroup(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException; - + /** * Shutdown the activation system and all associated activation groups - * + * * @throws RemoteException if the remote call fails */ void shutdown() throws RemoteException; @@ -151,7 +151,7 @@ public interface ActivationSystem /** * Replace the activation descriptor for the object with the given activation * id. - * + * * @param id the activation id * @param desc the new activation descriptor * @return the previous activation descriptor for that object. @@ -164,11 +164,11 @@ public interface ActivationSystem ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException, UnknownObjectException, UnknownGroupException, RemoteException; - + /** * Replaces the group descriptor for the group with the given group activation * id. - * + * * @param groupId the group id * @param groupDesc the new group descriptor * @return the previous group descriptor @@ -179,10 +179,10 @@ public interface ActivationSystem ActivationGroupDesc setActivationGroupDesc(ActivationGroupID groupId, ActivationGroupDesc groupDesc) throws ActivationException, UnknownGroupException, RemoteException; - + /** * Get the activation descriptor for the object with the given activation id. - * + * * @param id the object activation id * @return the activation descriptor for that object * @throws ActivationException if the database access fails @@ -191,10 +191,10 @@ public interface ActivationSystem */ ActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException; - + /** * Get the group descriptor for the group with the given id. - * + * * @param groupId the group id * @return the group descriptor * @throws ActivationException if the database access fails diff --git a/libjava/classpath/java/rmi/activation/Activator.java b/libjava/classpath/java/rmi/activation/Activator.java index d0de12d8c97..fc66b2b6322 100644 --- a/libjava/classpath/java/rmi/activation/Activator.java +++ b/libjava/classpath/java/rmi/activation/Activator.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -58,7 +58,7 @@ public interface Activator * identifier, determines the object activation group and initiates object * recreation either via {@link ActivationInstantiator} or via * {@link Class#newInstance()}. - * + * * @param id the identifier of the object to activate. * @param force if true, the activator always contacts the group to obtain the * reference. If false, it may return the cached value. diff --git a/libjava/classpath/java/rmi/activation/UnknownGroupException.java b/libjava/classpath/java/rmi/activation/UnknownGroupException.java index 91890a9073d..3c67aec0c74 100644 --- a/libjava/classpath/java/rmi/activation/UnknownGroupException.java +++ b/libjava/classpath/java/rmi/activation/UnknownGroupException.java @@ -1,4 +1,4 @@ -/* UnknownGroupException.java -- thrown on an invalid ActivationGroupID +/* UnknownGroupException.java -- thrown on an invalid ActivationGroupID Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |