diff options
Diffstat (limited to 'libjava/classpath/java/rmi')
49 files changed, 453 insertions, 453 deletions
diff --git a/libjava/classpath/java/rmi/AccessException.java b/libjava/classpath/java/rmi/AccessException.java index 40954df..c14b876 100644 --- a/libjava/classpath/java/rmi/AccessException.java +++ b/libjava/classpath/java/rmi/AccessException.java @@ -1,5 +1,5 @@ /* AccessException.java -- thrown if the caller does not have access - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/java/rmi/AlreadyBoundException.java b/libjava/classpath/java/rmi/AlreadyBoundException.java index 10f6e4c..c56a4ee 100644 --- a/libjava/classpath/java/rmi/AlreadyBoundException.java +++ b/libjava/classpath/java/rmi/AlreadyBoundException.java @@ -1,5 +1,5 @@ /* AlreadyBoundException.java -- thrown if a binding is already bound - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/java/rmi/MarshalledObject.java b/libjava/classpath/java/rmi/MarshalledObject.java index 180c0a9..a48e4c0 100644 --- a/libjava/classpath/java/rmi/MarshalledObject.java +++ b/libjava/classpath/java/rmi/MarshalledObject.java @@ -1,5 +1,5 @@ /* MarshalledObject.java -- - Copyright (c) 1996, 1997, 1998, 1999, 2004, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -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 @@ -51,8 +51,8 @@ import java.io.Serializable; * marshalled according to the RMI specification. * <p> * An object passed to the constructor is serialized and tagged with the needed - * URL to retrieve its class definition for remote usage. If the object is a - * remote reference its stub is serialized instead. The instance of this + * URL to retrieve its class definition for remote usage. If the object is a + * remote reference its stub is serialized instead. The instance of this * marshalled object can be later retrieved by its <code>get()</code> method. * </p> * @@ -70,14 +70,14 @@ public final class MarshalledObject<T> /** * Constructs a <code>MarshalledObject</code> from the given object. - * + * * @param obj the object to marshal * @throws IOException if an I/O error during serialization occurs. */ public MarshalledObject(T obj) throws IOException { ByteArrayOutputStream objStream = new ByteArrayOutputStream(); - RMIMarshalledObjectOutputStream stream = + RMIMarshalledObjectOutputStream stream = new RMIMarshalledObjectOutputStream(objStream); stream.writeObject(obj); stream.flush(); @@ -88,7 +88,7 @@ public final class MarshalledObject<T> hash = 0; for (int i = 0; i < objBytes.length; i++) hash = hash * 31 + objBytes[i]; - + if (locBytes != null) for (int i = 0; i < locBytes.length; i++) hash = hash * 31 + locBytes[i]; @@ -96,12 +96,12 @@ public final class MarshalledObject<T> /** * Checks if the given object is equal to this marshalled object. - * + * * <p>Marshalled objects are considered equal if they contain the - * same serialized object. Codebase annotations where the class + * same serialized object. Codebase annotations where the class * definition can be downloaded are ignored in the equals test.</p> * - * @param obj the object to compare. + * @param obj the object to compare. * @return <code>true</code> if equal, <code>false</code> otherwise. */ public boolean equals(Object obj) @@ -129,19 +129,19 @@ public final class MarshalledObject<T> /** * Constructs and returns a copy of the internal serialized object. - * + * * @return The deserialized object. - * + * * @throws IOException if an I/O exception occurs during deserialization. - * @throws ClassNotFoundException if the class of the deserialized object + * @throws ClassNotFoundException if the class of the deserialized object * cannot be found. */ public T get() throws IOException, ClassNotFoundException { if (objBytes == null) return null; - - RMIMarshalledObjectInputStream stream = + + RMIMarshalledObjectInputStream stream = new RMIMarshalledObjectInputStream(objBytes, locBytes); return (T) stream.readObject(); } diff --git a/libjava/classpath/java/rmi/Naming.java b/libjava/classpath/java/rmi/Naming.java index b605da70..7f74add 100644 --- a/libjava/classpath/java/rmi/Naming.java +++ b/libjava/classpath/java/rmi/Naming.java @@ -1,5 +1,5 @@ /* Naming.java -- - Copyright (c) 1996, 1997, 1998, 1999, 2004, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -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 @@ -65,7 +65,7 @@ import java.rmi.registry.Registry; * </p> * <p> * RMI services are registered using one of these names, and the same name - * is later used by the client to lookup the service and access its methods. + * is later used by the client to lookup the service and access its methods. * Registries can be shared by multiple services, or a service can create * its own registry using <code>createRegistry()</code>. * </p> @@ -87,15 +87,15 @@ public final class Naming } /** - * Looks for the remote object that is associated with the named service. + * Looks for the remote object that is associated with the named service. * Name and location is given in form of a URL without a scheme: - * + * * <pre> * //host:port/service-name * </pre> - * + * * The port is optional. - * + * * @param name the service name and location * @return Remote-object that implements the named service * @throws NotBoundException if no object implements the service @@ -112,7 +112,7 @@ public final class Naming /** * Try to bind the given object to the given service name. - * + * * @param name * @param obj * @throws AlreadyBoundException @@ -129,7 +129,7 @@ public final class Naming /** * Remove a binding for a given service name. - * + * * @param name * @throws RemoteException * @throws NotBoundException @@ -146,7 +146,7 @@ public final class Naming /** * Forces the binding between the given Remote-object and the given service * name, even if there was already an object bound to this name. - * + * * @param name * @param obj * @throws RemoteException @@ -162,7 +162,7 @@ public final class Naming /** * Lists all services at the named registry. - * + * * @param name url that specifies the registry * @return list of services at the name registry * @throws RemoteException @@ -190,7 +190,7 @@ public final class Naming * Parses the supplied URL and converts it to use the HTTP protocol. From an * RMI perspective, the scheme is irrelevant and we want to be able to create * a URL for which a handler is available. - * + * * @param name the URL in String form. * @throws MalformedURLException if the URL is invalid. */ @@ -216,7 +216,7 @@ public final class Naming /** * Checks that the URL contains a name, and removes any leading slashes. - * + * * @param url the URL to check. * @throws MalformedURLException if no name is specified. */ diff --git a/libjava/classpath/java/rmi/NoSuchObjectException.java b/libjava/classpath/java/rmi/NoSuchObjectException.java index 2943906..a2af433 100644 --- a/libjava/classpath/java/rmi/NoSuchObjectException.java +++ b/libjava/classpath/java/rmi/NoSuchObjectException.java @@ -1,5 +1,5 @@ /* NoSuchObjectException.java -- thrown if the remote object no longer exists - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/java/rmi/NotBoundException.java b/libjava/classpath/java/rmi/NotBoundException.java index 03d4adf..fdd6468 100644 --- a/libjava/classpath/java/rmi/NotBoundException.java +++ b/libjava/classpath/java/rmi/NotBoundException.java @@ -1,5 +1,5 @@ /* NotBoundException.java -- attempt to use a registry name with no binding - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/java/rmi/RMISecurityException.java b/libjava/classpath/java/rmi/RMISecurityException.java index 6f15af8..7a2d214 100644 --- a/libjava/classpath/java/rmi/RMISecurityException.java +++ b/libjava/classpath/java/rmi/RMISecurityException.java @@ -1,5 +1,5 @@ /* RMISecurityException.java -- deprecated version of SecurityException - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -39,7 +39,7 @@ exception statement from your version. */ package java.rmi; /** - * Never thrown, but originally intended to wrap a + * Never thrown, but originally intended to wrap a * {@link java.lang.SecurityException} in the case of RMI. * * @author unknown diff --git a/libjava/classpath/java/rmi/RMISecurityManager.java b/libjava/classpath/java/rmi/RMISecurityManager.java index a8eb13e..3f7e1fb 100644 --- a/libjava/classpath/java/rmi/RMISecurityManager.java +++ b/libjava/classpath/java/rmi/RMISecurityManager.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 diff --git a/libjava/classpath/java/rmi/Remote.java b/libjava/classpath/java/rmi/Remote.java index 0306981..8c2720e 100644 --- a/libjava/classpath/java/rmi/Remote.java +++ b/libjava/classpath/java/rmi/Remote.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 @@ -42,15 +42,15 @@ package java.rmi; * from outside of this virtual machine through remote method calls. * <p> * Remote invokable methods of remote object implementations are specified - * as the methods defined in the implemented remote interfaces. Typically - * remote object implementations are subclasses of the convenience classes - * {@link java.rmi.server.UnicastRemoteObject} or + * as the methods defined in the implemented remote interfaces. Typically + * remote object implementations are subclasses of the convenience classes + * {@link java.rmi.server.UnicastRemoteObject} or * {@link java.rmi.activation.Activatable} implementing one or more remote * interfaces indicating their remotely accessible methods. The convenience - * classes provide implementations for correct remote object creation, + * classes provide implementations for correct remote object creation, * hash, equals and toString methods. * </p> - * + * * @author unknown */ public interface Remote { diff --git a/libjava/classpath/java/rmi/RemoteException.java b/libjava/classpath/java/rmi/RemoteException.java index 929bc80..276aa37 100644 --- a/libjava/classpath/java/rmi/RemoteException.java +++ b/libjava/classpath/java/rmi/RemoteException.java @@ -1,5 +1,5 @@ /* RemoteException.java -- common superclass for exceptions in java.rmi - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/java/rmi/StubNotFoundException.java b/libjava/classpath/java/rmi/StubNotFoundException.java index 524b418..992df12 100644 --- a/libjava/classpath/java/rmi/StubNotFoundException.java +++ b/libjava/classpath/java/rmi/StubNotFoundException.java @@ -1,5 +1,5 @@ /* StubNotFoundException.java -- thrown if a valid stub is not found - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. diff --git a/libjava/classpath/java/rmi/UnknownHostException.java b/libjava/classpath/java/rmi/UnknownHostException.java index e21b994..7e77dca 100644 --- a/libjava/classpath/java/rmi/UnknownHostException.java +++ b/libjava/classpath/java/rmi/UnknownHostException.java @@ -45,7 +45,7 @@ package java.rmi; * @since 1.1 * @status updated to 1.4 */ -public class UnknownHostException extends RemoteException +public class UnknownHostException extends RemoteException { /** * Compatible with JDK 1.1+. diff --git a/libjava/classpath/java/rmi/activation/Activatable.java b/libjava/classpath/java/rmi/activation/Activatable.java index 6977d98..9ec7cad 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 ae2b78e..9970cd6 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 ad5a05d..230c714 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 bf7445f..a0c88ec 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 e54b2a0..77fa4fb 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 e1cc8a7..f89a0ed 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 3f4b557..e4ea541 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 93def8c..7c4c171 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 7196764..090ce48 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 d0de12d..fc66b2b 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 91890a9..3c67aec 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 diff --git a/libjava/classpath/java/rmi/dgc/DGC.java b/libjava/classpath/java/rmi/dgc/DGC.java index 66bfc6d..5ec874a 100644 --- a/libjava/classpath/java/rmi/dgc/DGC.java +++ b/libjava/classpath/java/rmi/dgc/DGC.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 @@ -56,7 +56,7 @@ public interface DGC { /** * Mark the given objects referecnes as used on the client side. - * + * * @param ids the ids of the used objects. * @param sequenceNum the number of the call (used to detect and discard late * calls). @@ -68,7 +68,7 @@ public interface DGC /** * Mark the given objects as no longer used on the client side. - * + * * @param ids the ids of the objects that are no longer used. * @param sequenceNum the number of the call (used to detect and discard late * @param vmid the VMID of the client. diff --git a/libjava/classpath/java/rmi/dgc/Lease.java b/libjava/classpath/java/rmi/dgc/Lease.java index 36ff12a..58b82cf 100644 --- a/libjava/classpath/java/rmi/dgc/Lease.java +++ b/libjava/classpath/java/rmi/dgc/Lease.java @@ -56,7 +56,7 @@ public final class Lease /** * Create the new lease with the given id and duration - * + * * @param id the lease id * @param duration the lease duration */ @@ -68,7 +68,7 @@ public final class Lease /** * Get the lease id. - * + * * @return the lease id */ public VMID getVMID() @@ -78,7 +78,7 @@ public final class Lease /** * Get the lease duration - * + * * @return the lease duration */ public long getValue() @@ -88,7 +88,7 @@ public final class Lease /** * Get the string representation of this lease - * + * * @return the string represenation (lease id, followed by the lease * duration). */ diff --git a/libjava/classpath/java/rmi/dgc/VMID.java b/libjava/classpath/java/rmi/dgc/VMID.java index 22b73736..925c1bf 100644 --- a/libjava/classpath/java/rmi/dgc/VMID.java +++ b/libjava/classpath/java/rmi/dgc/VMID.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 @@ -49,24 +49,24 @@ import java.util.Arrays; * An identifier that is unique accross the all virtual machines. This class is * used by distributed garbage collector to identify the virtual machine of * the client, but may also be used in various other cases, when such identifier - * is required. This class separately stores and transfers the host IP + * is required. This class separately stores and transfers the host IP * address, but will try to do its best also for the case if it failed to - * determine it. The alternative algorithms are used in {@link UID} that is + * determine it. The alternative algorithms are used in {@link UID} that is * part of this class. The VMID's, created on the same host, but in the two * separately (parallely) running virtual machines are different. */ -public final class VMID implements Serializable +public final class VMID implements Serializable { /** * Use SVUID for interoperability. */ static final long serialVersionUID = -538642295484486218L; - + /** * If true, the IP of this host can ve reliably determined. */ static boolean areWeUnique; - + /** * The IP address of the local host. */ @@ -76,12 +76,12 @@ public final class VMID implements Serializable * The IP address of the local host. */ private byte[] addr; - + /** * The cached hash code. */ transient int hash; - + /** * The UID of this VMID. */ @@ -89,7 +89,7 @@ public final class VMID implements Serializable static { - // This "local host" value usually indicates that the local + // This "local host" value usually indicates that the local // IP address cannot be reliably determined. byte[] localHost = new byte[] { 127, 0, 0, 1 }; @@ -104,10 +104,10 @@ public final class VMID implements Serializable areWeUnique = false; } } - + /** * Create the new VMID. All VMID's are unique accross tha all virtual - * machines. + * machines. */ public VMID() { @@ -119,11 +119,11 @@ public final class VMID implements Serializable * Return true if it is possible to get the accurate address of this host. * If false is returned, the created VMID's are less reliable, but the * starting time and possibly the memory allocation are also taken into - * consideration in the incorporated UID. Hence the VMID's, created on the + * consideration in the incorporated UID. Hence the VMID's, created on the * different virtual machines, still should be different. - * + * * @deprecated VMID's are more or less always reliable. - * + * * @return false if the local host ip address is 127.0.0.1 or unknown, * true otherwise. */ @@ -131,7 +131,7 @@ public final class VMID implements Serializable { return areWeUnique; } - + /** * Get the hash code of this VMID. */ @@ -145,7 +145,7 @@ public final class VMID implements Serializable } return hash; } - + /** * Returns true if the passed parameter is also VMID and it is equal to this * VMID. The VMID should only be equal to itself (also if the passed value is @@ -164,24 +164,24 @@ public final class VMID implements Serializable return false; } - + /** * Get the string representation of this VMID. */ public String toString () { CPStringBuilder buf = new CPStringBuilder ("[VMID: "); - + for (int i = 0; i < addr.length; i++) { if (i > 0) { buf.append ("."); } - + buf.append (Integer.toString (addr [i])); } - + buf.append (" "); buf.append (uid.toString ()); buf.append ("]"); diff --git a/libjava/classpath/java/rmi/registry/LocateRegistry.java b/libjava/classpath/java/rmi/registry/LocateRegistry.java index 3547a7a..d0918e1 100644 --- a/libjava/classpath/java/rmi/registry/LocateRegistry.java +++ b/libjava/classpath/java/rmi/registry/LocateRegistry.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 @@ -56,32 +56,32 @@ public final class LocateRegistry { private LocateRegistry() {} public static Registry getRegistry() throws RemoteException { - return (getRegistry("localhost", Registry.REGISTRY_PORT)); + return (getRegistry("localhost", Registry.REGISTRY_PORT)); } public static Registry getRegistry(int port) throws RemoteException { - return (getRegistry("localhost", port)); + return (getRegistry("localhost", port)); } public static Registry getRegistry(String host) throws RemoteException { - return (getRegistry(host, Registry.REGISTRY_PORT)); + return (getRegistry(host, Registry.REGISTRY_PORT)); } public static Registry getRegistry(String host, int port) throws RemoteException { - return (getRegistry(host, port, RMISocketFactory.getSocketFactory())); + return (getRegistry(host, port, RMISocketFactory.getSocketFactory())); } public static Registry getRegistry(String host, int port, RMIClientSocketFactory csf) throws RemoteException { - RemoteRef ref = new UnicastRef(new ObjID(ObjID.REGISTRY_ID), host, port, csf); - return (new RegistryImpl_Stub(ref)); + RemoteRef ref = new UnicastRef(new ObjID(ObjID.REGISTRY_ID), host, port, csf); + return (new RegistryImpl_Stub(ref)); } public static Registry createRegistry(int port) throws RemoteException { - return (createRegistry(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory())); + return (createRegistry(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory())); } public static Registry createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException { - return (new RegistryImpl(port, csf, ssf)); + return (new RegistryImpl(port, csf, ssf)); } } diff --git a/libjava/classpath/java/rmi/registry/Registry.java b/libjava/classpath/java/rmi/registry/Registry.java index 02d8c50..dabe654 100644 --- a/libjava/classpath/java/rmi/registry/Registry.java +++ b/libjava/classpath/java/rmi/registry/Registry.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 @@ -47,25 +47,25 @@ import java.rmi.RemoteException; public interface Registry extends Remote { int REGISTRY_PORT = 1099; - + /** * Find and return the reference to the object that was previously bound * to the registry by this name. For remote objects, this method returns * the stub instances, containing the code for remote invocations. - * - * Since jdk 1.5 this method does not longer require the stub class - * (nameImpl_Stub) to be present. If such class is not found, the stub is - * replaced by the dynamically constructed proxy class. No attempt to find - * and load the stubs is made if the system property - * java.rmi.server.ignoreStubClasses is set to true (set to reduce the + * + * Since jdk 1.5 this method does not longer require the stub class + * (nameImpl_Stub) to be present. If such class is not found, the stub is + * replaced by the dynamically constructed proxy class. No attempt to find + * and load the stubs is made if the system property + * java.rmi.server.ignoreStubClasses is set to true (set to reduce the * starting time if the stubs are surely not present and exclusively 1.2 * RMI is used). - * + * * @param name the name of the object - * + * * @return the reference to that object on that it is possible to invoke * the (usually remote) object methods. - * + * * @throws RemoteException * @throws NotBoundException * @throws AccessException diff --git a/libjava/classpath/java/rmi/registry/RegistryHandler.java b/libjava/classpath/java/rmi/registry/RegistryHandler.java index b9b4509..19e8caa 100644 --- a/libjava/classpath/java/rmi/registry/RegistryHandler.java +++ b/libjava/classpath/java/rmi/registry/RegistryHandler.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 diff --git a/libjava/classpath/java/rmi/server/LoaderHandler.java b/libjava/classpath/java/rmi/server/LoaderHandler.java index 8e96615..de9d653 100644 --- a/libjava/classpath/java/rmi/server/LoaderHandler.java +++ b/libjava/classpath/java/rmi/server/LoaderHandler.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 diff --git a/libjava/classpath/java/rmi/server/LogStream.java b/libjava/classpath/java/rmi/server/LogStream.java index a2dfbb4..a74ffb4 100644 --- a/libjava/classpath/java/rmi/server/LogStream.java +++ b/libjava/classpath/java/rmi/server/LogStream.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 @@ -72,7 +72,7 @@ public class LogStream extends PrintStream { return defStream; } - + /** * @deprecated */ @@ -130,17 +130,17 @@ public class LogStream extends PrintStream { return SILENT; } - + if (s.equalsIgnoreCase ("brief")) { return BRIEF; } - + if (s.equalsIgnoreCase ("verbose")) { return VERBOSE; } - + return SILENT; } } diff --git a/libjava/classpath/java/rmi/server/ObjID.java b/libjava/classpath/java/rmi/server/ObjID.java index 1aaa223..2bdd44a 100644 --- a/libjava/classpath/java/rmi/server/ObjID.java +++ b/libjava/classpath/java/rmi/server/ObjID.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 @@ -50,7 +50,7 @@ import java.io.Serializable; * Represents the object identifier, unique for the host that generated it. * The ObjID contains inside the integer object identifier that, if needed, * may indicated that this is a reference to one of the well known objects - * on that host (registry, activator or dgc) and the {@link UID} that + * on that host (registry, activator or dgc) and the {@link UID} that * ensures uniqueness. */ public final class ObjID @@ -121,7 +121,7 @@ public final class ObjID * <li>{@link #DGC_ID} - distributed garbage collector (grants lease * durations to keep the object before it is garbage collected.</li> * </ul> - * + * * @param id the well known object id, one of the above. */ public ObjID(int id) @@ -184,8 +184,8 @@ public final class ObjID return a == b; else return a.equals(b); - } - + } + /** * Get the string representation. */ diff --git a/libjava/classpath/java/rmi/server/Operation.java b/libjava/classpath/java/rmi/server/Operation.java index f7b5f02..de30cd0 100644 --- a/libjava/classpath/java/rmi/server/Operation.java +++ b/libjava/classpath/java/rmi/server/Operation.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 @@ -40,7 +40,7 @@ package java.rmi.server; /** * This class was used with jdk 1.1 stubs and skeletons. It is no longer * needed since jdk 1.2 and higher. - * + * * @deprecated */ public class Operation @@ -58,7 +58,7 @@ public class Operation /** * Get the name of the operation. - * + * * @deprecated */ public String getOperation () @@ -68,7 +68,7 @@ public class Operation /** * Return the name of the operation. - * + * * @deprecated */ public String toString () diff --git a/libjava/classpath/java/rmi/server/RMIClassLoader.java b/libjava/classpath/java/rmi/server/RMIClassLoader.java index 7b69d2f2..f43a68c 100644 --- a/libjava/classpath/java/rmi/server/RMIClassLoader.java +++ b/libjava/classpath/java/rmi/server/RMIClassLoader.java @@ -74,7 +74,7 @@ public class RMIClassLoader { RMIClassLoaderSpi spi = getProviderInstance(); if (spi == null) - spi = getDefaultProviderInstance(); + spi = getDefaultProviderInstance(); return spi.loadClass(codebase, name, null); } @@ -84,7 +84,7 @@ public class RMIClassLoader { RMIClassLoaderSpi spi = getProviderInstance(); if (spi == null) - spi = getDefaultProviderInstance(); + spi = getDefaultProviderInstance(); return spi.loadClass(codebase, name, defaultLoader); } @@ -120,29 +120,29 @@ public class RMIClassLoader { RMIClassLoaderSpi spi = getProviderInstance(); if (spi == null) - spi = getDefaultProviderInstance(); + spi = getDefaultProviderInstance(); return spi.loadClass(codeBase.toString(), name, null); } /** * Gets a classloader for the given codebase and with the current * context classloader as parent. - * + * * @param codebase - * + * * @return a classloader for the given codebase - * + * * @throws MalformedURLException if the codebase contains a malformed URL */ - public static ClassLoader getClassLoader(String codebase) + public static ClassLoader getClassLoader(String codebase) throws MalformedURLException { RMIClassLoaderSpi spi = getProviderInstance(); if (spi == null) - spi = getDefaultProviderInstance(); + spi = getDefaultProviderInstance(); return spi.getClassLoader(codebase); } - + /** * Returns a string representation of the network location where a remote * endpoint can get the class-definition of the given class. @@ -156,7 +156,7 @@ public class RMIClassLoader { RMIClassLoaderSpi spi = getProviderInstance(); if (spi == null) - spi = getDefaultProviderInstance(); + spi = getDefaultProviderInstance(); return spi.getClassAnnotation(cl); } diff --git a/libjava/classpath/java/rmi/server/RMIClientSocketFactory.java b/libjava/classpath/java/rmi/server/RMIClientSocketFactory.java index a54d111..ee829fb 100644 --- a/libjava/classpath/java/rmi/server/RMIClientSocketFactory.java +++ b/libjava/classpath/java/rmi/server/RMIClientSocketFactory.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 diff --git a/libjava/classpath/java/rmi/server/RMIFailureHandler.java b/libjava/classpath/java/rmi/server/RMIFailureHandler.java index 3496cd6..68a5706 100644 --- a/libjava/classpath/java/rmi/server/RMIFailureHandler.java +++ b/libjava/classpath/java/rmi/server/RMIFailureHandler.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 diff --git a/libjava/classpath/java/rmi/server/RMIServerSocketFactory.java b/libjava/classpath/java/rmi/server/RMIServerSocketFactory.java index 88eaff3..7af8ef0 100644 --- a/libjava/classpath/java/rmi/server/RMIServerSocketFactory.java +++ b/libjava/classpath/java/rmi/server/RMIServerSocketFactory.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 diff --git a/libjava/classpath/java/rmi/server/RMISocketFactory.java b/libjava/classpath/java/rmi/server/RMISocketFactory.java index 953f1ef..af5a120 100644 --- a/libjava/classpath/java/rmi/server/RMISocketFactory.java +++ b/libjava/classpath/java/rmi/server/RMISocketFactory.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 diff --git a/libjava/classpath/java/rmi/server/RemoteCall.java b/libjava/classpath/java/rmi/server/RemoteCall.java index 35f3bf1..cd4b004 100644 --- a/libjava/classpath/java/rmi/server/RemoteCall.java +++ b/libjava/classpath/java/rmi/server/RemoteCall.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 diff --git a/libjava/classpath/java/rmi/server/RemoteObject.java b/libjava/classpath/java/rmi/server/RemoteObject.java index 5b926bf..220c1c9 100644 --- a/libjava/classpath/java/rmi/server/RemoteObject.java +++ b/libjava/classpath/java/rmi/server/RemoteObject.java @@ -48,7 +48,7 @@ import java.rmi.UnmarshalException; import java.util.WeakHashMap; public abstract class RemoteObject - implements Remote, Serializable { + implements Remote, Serializable { private static final long serialVersionUID = -3215090123894869218l; @@ -57,15 +57,15 @@ protected transient RemoteRef ref; private static final WeakHashMap stubs = new WeakHashMap(); protected RemoteObject() { - this(null); + this(null); } protected RemoteObject(RemoteRef newref) { - ref = newref; + ref = newref; } public RemoteRef getRef() { - return (ref); + return (ref); } synchronized static void addStub(Remote obj, Remote stub) @@ -78,7 +78,7 @@ synchronized static void deleteStub(Remote obj) stubs.remove(obj); } - public static Remote toStub(Remote obj) throws NoSuchObjectException + public static Remote toStub(Remote obj) throws NoSuchObjectException { Remote stub = (Remote)stubs.get(obj); @@ -89,36 +89,36 @@ synchronized static void deleteStub(Remote obj) } public int hashCode() { - if (ref == null) { - return (0); - } - else { - return (ref.hashCode()); - } + if (ref == null) { + return (0); + } + else { + return (ref.hashCode()); + } } public boolean equals(Object obj) { - // We only compare references. - return (this == obj); + // We only compare references. + return (this == obj); } /** * Get the string representation of this remote object. */ - public String toString() + public String toString() { if (ref == null) return getClass ().toString (); return (ref.toString ()); } - + /** * Read the remote object from the input stream. Expects the class name * without package first. Then the method creates and assigns the {@link #ref} * an instance of this class and calls its .readExternal method. The standard * packageless class names are UnicastRef, UnicastRef2, UnicastServerRef, * UnicastServerRef2, ActivatableRef or ActivatableServerRef. - * + * * @param in the stream to read from * @throws IOException if the IO exception occurs * @throws ClassNotFoundException if the class with the given name is not @@ -171,7 +171,7 @@ public boolean equals(Object obj) { * ActivatableRef or ActivatableServerRef. The empty string with the * subsequently following serialized ref instance be written if the * ref.getRefClass returns null. - * + * * @param out the stream to write to * @throws IOException if one occurs during writing * @throws ClassNotFoundException never in this implementation (specified as diff --git a/libjava/classpath/java/rmi/server/RemoteObjectInvocationHandler.java b/libjava/classpath/java/rmi/server/RemoteObjectInvocationHandler.java index 2c19cd5..0cf4bca 100644 --- a/libjava/classpath/java/rmi/server/RemoteObjectInvocationHandler.java +++ b/libjava/classpath/java/rmi/server/RemoteObjectInvocationHandler.java @@ -60,7 +60,7 @@ import java.util.Hashtable; * user program. Such instances are automatically created and returned by * {@link Registry} or {@link UnicastRemoteObject} methods if the remote * reference is known but the corresponding stub class is not accessible. - * + * * @see Registry#lookup * * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) @@ -72,32 +72,32 @@ public class RemoteObjectInvocationHandler extends RemoteObject implements * Use the jdk 1.5 SUID for interoperability. */ static final long serialVersionUID = 2L; - + /** * The RMI method hash codes, computed once as described in the section 8.3 * of the Java Remote Method Invocation (RMI) Specification. */ static Hashtable methodHashCodes = new Hashtable(); - + /** * The empty class array to define parameters of .hashCode and .toString. */ static final Class[] noArgsC = new Class[0]; - + /** * The class array to define parameters of .equals */ static final Class[] anObjectC = new Class[] { Object.class }; - + /** * The empty object array to replace null when no args are passed. */ static final Object[] noArgs = new Object[0]; - + /** * Construct the remote invocation handler that forwards calls to the given * remote object. - * + * * @param reference the reference to the remote object where the method * calls should be forwarded. */ @@ -121,7 +121,7 @@ public class RemoteObjectInvocationHandler extends RemoteObject implements * <li>All other methods are converted to remote calls and forwarded to the * remote reference. </li> * </ul> - * + * * @param proxyInstance * the instance of the proxy stub * @param method @@ -148,7 +148,7 @@ public class RemoteObjectInvocationHandler extends RemoteObject implements throw new IllegalAccessException(name + " does not implement " + Remote.class.getName()); } - + if (parameters == null) parameters = noArgs; diff --git a/libjava/classpath/java/rmi/server/RemoteRef.java b/libjava/classpath/java/rmi/server/RemoteRef.java index 8bdb663..e0488fb 100644 --- a/libjava/classpath/java/rmi/server/RemoteRef.java +++ b/libjava/classpath/java/rmi/server/RemoteRef.java @@ -1,5 +1,5 @@ /* RemoteRef.java -- - Copyright (c) 1996, 1997, 1998, 1999, 2004, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -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 @@ -56,7 +56,7 @@ public interface RemoteRef extends Externalizable * Indicates compatibility with JDK 1.1.* */ long serialVersionUID = 3632638527362204081L; - + /** * For binary compatibility with the JDK, the string "sun.rmi.server". * Not actually used for anything. @@ -67,12 +67,12 @@ public interface RemoteRef extends Externalizable * @deprecated use {@link #invoke(Remote, Method, Object[], long)} instead. */ void invoke (RemoteCall call) throws Exception; - + /** * Invoke a method. This method either returns the result of remote invocation * or throws RemoteException if the remote call failed. Other exceptions may * be thrown if some problem has occured in the application level. - * + * * @param obj the object, containing the remote reference (for instance, * remote stub, generated by rmic). * @param method the method to invoke @@ -85,7 +85,7 @@ public interface RemoteRef extends Externalizable */ Object invoke (Remote obj, Method method, Object[] params, long methodHash) throws Exception; - + /** * @deprecated use {@link #invoke(Remote, Method, Object[], long)} instead. */ @@ -96,41 +96,41 @@ public interface RemoteRef extends Externalizable * @deprecated use {@link #invoke(Remote, Method, Object[], long)} instead. */ void done (RemoteCall call) throws RemoteException; - + /** * Compare two remote objects for equality. The references are equal if * they point to the same remote object. - * + * * @param ref the reference to compare. - * + * * @return true if this and passed references both point to the same remote * object, false otherwise. */ boolean remoteEquals (RemoteRef ref); - + /** * Get the hashcode for a remote object. Two remote object stubs, referring * to the same remote object, have the same hash code. - * + * * @return the hashcode of the remote object */ int remoteHashCode(); - - + + /** * Returns the class name of the reference type that must be written to the * given stream. When writing, this returned name is passed first, and * the reference.writeExternal(out) writes the reference specific data. - * - * @param out the stream, where the data must be written - * - * @return the class name. + * + * @param out the stream, where the data must be written + * + * @return the class name. */ String getRefClass (ObjectOutput out); - + /** * Get the string representation of this remote reference. - * + * * @return the string representation. */ String remoteToString(); diff --git a/libjava/classpath/java/rmi/server/RemoteServer.java b/libjava/classpath/java/rmi/server/RemoteServer.java index f022b73..158c464 100644 --- a/libjava/classpath/java/rmi/server/RemoteServer.java +++ b/libjava/classpath/java/rmi/server/RemoteServer.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 @@ -51,7 +51,7 @@ public abstract class RemoteServer extends RemoteObject { private static final long serialVersionUID = - 4100238210092549637L; - + /** * Does nothing, delegates to super(). */ @@ -59,7 +59,7 @@ public abstract class RemoteServer { super(); } - + /** * Does nothing, delegates to super(ref). */ @@ -67,13 +67,13 @@ public abstract class RemoteServer { super(ref); } - + /** * Get the host of the calling client. The current thread must be an instance * of the {@link RMIIncomingThread}. - * + * * @return the client host address - * + * * @throws ServerNotActiveException if the current thread is not an instance * of the RMIIncomingThread. */ @@ -91,20 +91,20 @@ public abstract class RemoteServer "Unknown client host - current thread not instance of 'RMIIncomingThread'"); } } - + /** * Set the stream for logging RMI calls. - * + * * @param out the stream to set or null to turn the logging off. */ public static void setLog(OutputStream out) { throw new Error("Not implemented"); } - + /** * Get the stream for logging RMI calls. - * + * * @return the associated stream. */ public static PrintStream getLog() diff --git a/libjava/classpath/java/rmi/server/RemoteStub.java b/libjava/classpath/java/rmi/server/RemoteStub.java index d6dff7f..9fd5846 100644 --- a/libjava/classpath/java/rmi/server/RemoteStub.java +++ b/libjava/classpath/java/rmi/server/RemoteStub.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 @@ -38,7 +38,7 @@ exception statement from your version. */ package java.rmi.server; /** - * This is a base class for the automatically generated RMI stubs. + * This is a base class for the automatically generated RMI stubs. */ public abstract class RemoteStub extends RemoteObject { @@ -46,7 +46,7 @@ public abstract class RemoteStub extends RemoteObject * Use serialVersionUID for interoperability. */ static final long serialVersionUID = -1585587260594494182l; - + /** * Constructs the remote stub with no reference set. */ @@ -54,11 +54,11 @@ public abstract class RemoteStub extends RemoteObject { super (); } - + /** * Constructs the remote stub that uses given remote reference for the * method invocations. - * + * * @param ref the remote reference for the method invocation. */ protected RemoteStub (RemoteRef ref) @@ -67,10 +67,10 @@ public abstract class RemoteStub extends RemoteObject } /** - * Sets the given remote reference for the given stub. This method is + * Sets the given remote reference for the given stub. This method is * deprecated. Pass the stub remote reference to the RemoteStub * constructor instead. - * + * * @deprecated */ protected static void setRef (RemoteStub stub, RemoteRef ref) diff --git a/libjava/classpath/java/rmi/server/ServerRef.java b/libjava/classpath/java/rmi/server/ServerRef.java index cf1013c..5d34ef2 100644 --- a/libjava/classpath/java/rmi/server/ServerRef.java +++ b/libjava/classpath/java/rmi/server/ServerRef.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 diff --git a/libjava/classpath/java/rmi/server/Skeleton.java b/libjava/classpath/java/rmi/server/Skeleton.java index 82f5d38..94d5798 100644 --- a/libjava/classpath/java/rmi/server/Skeleton.java +++ b/libjava/classpath/java/rmi/server/Skeleton.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 diff --git a/libjava/classpath/java/rmi/server/UID.java b/libjava/classpath/java/rmi/server/UID.java index 940339e..464d3d8 100644 --- a/libjava/classpath/java/rmi/server/UID.java +++ b/libjava/classpath/java/rmi/server/UID.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 @@ -49,8 +49,8 @@ import java.net.InetAddress; * it. It contains time (when created), counter (the number of the UID * creation order) and virtual machine id components. The UID can also be * constructed specifying a "well known" identifier in the for of short: - * this identifier defines the UID uniqueness alone. - * + * this identifier defines the UID uniqueness alone. + * * @author Audrius Meskauskas (audriusa@bioinformatics.org) */ public final class UID @@ -60,16 +60,16 @@ public final class UID * Use the serial version uid for interoperability. */ private static final long serialVersionUID = 1086053664494604050L; - + /** * The UID counter (the ordinary number in the sequence of number of UID's, - * created during the recent millisecond). In the next millisecond, it + * created during the recent millisecond). In the next millisecond, it * starts from the minimal value again. In the unlikely case of creating * more than 65536 uids per millisecond the process pauses till the next * ms. */ private static short uidCounter = Short.MIN_VALUE; - + /** * The time, when the last UID has been created. */ @@ -94,7 +94,7 @@ public final class UID * The time stamp, when the UID was created. */ private long time; - + /** * Create the new UID that would have the described features of the * uniqueness. @@ -130,19 +130,19 @@ public final class UID } } } - + /** * Create the new UID with the well known id (number). All UIDs, creates * with the this constructor having the same parameter are equal to each * other (regardless to the host and time where they were created. - * + * * @param wellKnownId the well known UID. */ public UID(short wellKnownId) { unique = wellKnownId; } - + /** * Get the hashCode of this UID. */ @@ -150,7 +150,7 @@ public final class UID { return (int) (unique ^ time ^ count); } - + /** * Compare this UID with another UID for equality (not equal to other types of * objects). @@ -165,7 +165,7 @@ public final class UID else return false; } - + public static UID read(DataInput in) throws IOException { UID uid = new UID(); @@ -208,10 +208,10 @@ public final class UID return new Object().hashCode() ^ (int) System.currentTimeMillis() ^ hostIpHash; } - + /** * Get the string representation of this UID. - * + * * @return a string, uniquely identifying this id. */ public String toString() diff --git a/libjava/classpath/java/rmi/server/UnicastRemoteObject.java b/libjava/classpath/java/rmi/server/UnicastRemoteObject.java index 6ef3432..b6a9721 100644 --- a/libjava/classpath/java/rmi/server/UnicastRemoteObject.java +++ b/libjava/classpath/java/rmi/server/UnicastRemoteObject.java @@ -1,5 +1,5 @@ /* UnicastRemoteObject.java -- - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2003, 2006 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2003, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -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 @@ -46,7 +46,7 @@ import java.rmi.Remote; import java.rmi.RemoteException; /** - * This class obtains stub that communicates with the remote object. + * This class obtains stub that communicates with the remote object. */ public class UnicastRemoteObject extends RemoteServer { @@ -57,19 +57,19 @@ public class UnicastRemoteObject extends RemoteServer //The following serialized fields are from Java API Documentation // "Serialized form" - + /** * The port, on that the created remote object becomes available, * zero meaning the anonymous port. */ private int port; - + /** * The client socket factory for producing client sockets, used by this * object. */ private RMIClientSocketFactory csf; - + /** * The server socket factory for producing server sockets, used by this * object. @@ -78,44 +78,44 @@ public class UnicastRemoteObject extends RemoteServer /** * Create and export new remote object without specifying the port value. - * + * * @throws RemoteException if the attempt to export the object failed. */ protected UnicastRemoteObject() throws RemoteException { - this(0); + this(0); } - + /** * Create and export the new remote object, making it available at the * given port, local host. - * + * * @param port the port, on that the object should become available. * Zero means anonymous port. - * + * * @throws RemoteException if the attempt to export the object failed. */ protected UnicastRemoteObject(int port) throws RemoteException { - this(port, RMISocketFactory.getSocketFactory(), + this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory()); } /** * 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 clientSocketFactory the client socket factory * @param serverSocketFactory the server socket factory - * + * * @throws RemoteException if the attempt to export the object failed. */ - protected UnicastRemoteObject(int port, + protected UnicastRemoteObject(int port, RMIClientSocketFactory clientSocketFactory, RMIServerSocketFactory serverSocketFactory) throws RemoteException @@ -131,53 +131,53 @@ public class UnicastRemoteObject extends RemoteServer protected UnicastRemoteObject(RemoteRef ref) throws RemoteException { - super((UnicastServerRef) ref); - exportObject(this, 0); + super((UnicastServerRef) ref); + exportObject(this, 0); } public Object clone() throws CloneNotSupportedException { - throw new Error("Not implemented"); + throw new Error("Not implemented"); } - + /** - * Export object, making it available for the remote calls at the - * anonymous port. - * + * Export object, making it available for the remote calls at the + * anonymous port. + * * This method returns the instance of the abstract class, not an interface. * Hence it will not work with the proxy stubs that are supported since * jdk 1.5 (such stubs cannot be derived from the RemoteStub). Only use * this method if you are sure that the stub class will be accessible. - * + * * @param obj the object being exported. - * + * * @return the remote object stub - * + * * @throws RemoteException if the attempt to export the object failed. */ public static RemoteStub exportObject(Remote obj) throws RemoteException { - return (RemoteStub) exportObject(obj, 0); + return (RemoteStub) exportObject(obj, 0); } /** - * Export object, making it available for the remote calls at the + * Export object, making it available for the remote calls at the * specified port. - * + * * Since jdk 1.5 this method does not longer require the stub class to be - * present. If such class is not found, the stub is replaced by the + * present. If such class is not found, the stub is replaced by the * dynamically constructed proxy class. No attempt to find and load the stubs * is made if the system property java.rmi.server.ignoreStubClasses - * is set to true (set to reduce the starting time if the stubs are + * is set to true (set to reduce the starting time if the stubs are * surely not present and exclusively 1.2 RMI is used). - * + * * @param obj the object being exported. * @param port the remote object port - * + * * @return the remote object stub - * + * * @throws RemoteException if the attempt to export the object failed. */ public static Remote exportObject(Remote obj, int port) @@ -189,21 +189,21 @@ public class UnicastRemoteObject extends RemoteServer /** * Create and export the new remote object, making it available at the * given port, using sockets, produced by the specified factories. - * + * * Since jdk 1.5 this method does not longer require the stub class to be - * present. If such class is not found, the stub is replaced by the + * present. If such class is not found, the stub is replaced by the * dynamically constructed proxy class. No attempt to find and load the stubs * is made if the system property java.rmi.server.ignoreStubClasses - * is set to true (set to reduce the starting time if the stubs are + * is set to true (set to reduce the starting time if the stubs are * surely not present and exclusively 1.2 RMI is used). - * + * * @param port the port, on that the object should become available. * Zero means anonymous port. - * + * * @param serverSocketFactory the server socket factory - */ - static Remote exportObject(Remote obj, int port, - RMIServerSocketFactory serverSocketFactory) + */ + static Remote exportObject(Remote obj, int port, + RMIServerSocketFactory serverSocketFactory) throws RemoteException { UnicastServerRef sref = null; @@ -224,13 +224,13 @@ public class UnicastRemoteObject extends RemoteServer public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) - throws RemoteException + throws RemoteException { return (exportObject(obj, port, ssf)); } - public static boolean unexportObject(Remote obj, boolean force) - throws NoSuchObjectException + public static boolean unexportObject(Remote obj, boolean force) + throws NoSuchObjectException { if (obj instanceof RemoteObject) { diff --git a/libjava/classpath/java/rmi/server/Unreferenced.java b/libjava/classpath/java/rmi/server/Unreferenced.java index 982aa64..6d4df48 100644 --- a/libjava/classpath/java/rmi/server/Unreferenced.java +++ b/libjava/classpath/java/rmi/server/Unreferenced.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 |