Activatable.java, [...]: RMI implementation from Kaffe.
* java/rmi/activation/Activatable.java, java/rmi/activation/ActivateFailedException.java, java/rmi/activation/ActivationDesc.java, java/rmi/activation/ActivationException.java, java/rmi/activation/ActivationGroup.java, java/rmi/activation/ActivationGroupDesc.java, java/rmi/activation/ActivationGroupID.java, java/rmi/activation/ActivationID.java, java/rmi/activation/ActivationInstantiator.java, java/rmi/activation/ActivationMonitor.java, java/rmi/activation/ActivationSystem.java, java/rmi/activation/Activator.java, java/rmi/activation/UnknownGroupException.java, java/rmi/activation/UnknownObjectException.java, java/rmi/AccessException.java, java/rmi/AlreadyBoundException.java, java/rmi/ConnectException.java, java/rmi/ConnectIOException.java, java/rmi/MarshalException.java, java/rmi/MarshalledObject.java, java/rmi/Naming.java, java/rmi/NoSuchObjectException.java, java/rmi/NotBoundException.java, java/rmi/RMISecurityException.java, java/rmi/RMISecurityManager.java, java/rmi/Remote.java, java/rmi/RemoteException.java, java/rmi/ServerError.java, java/rmi/ServerException.java, java/rmi/ServerRuntimeException.java, java/rmi/StubNotFoundException.java, java/rmi/UnexpectedException.java, java/rmi/UnknownHostException.java, java/rmi/UnmarshalException.java, java/rmi/dgc/DGC.java, java/rmi/dgc/Lease.java, java/rmi/dgc/VMID.java, java/rmi/registry/LocateRegistry.java, java/rmi/registry/Registry.java, java/rmi/registry/RegistryHandler.java, java/rmi/server/ExportException.java, java/rmi/server/LoaderHandler.java, java/rmi/server/LogStream.java, java/rmi/server/ObjID.java, java/rmi/server/Operation.java, java/rmi/server/RMIClassLoader.java, java/rmi/server/RMIClientSocketFactory.java, java/rmi/server/RMIFailureHandler.java, java/rmi/server/RMIServerSocketFactory.java, java/rmi/server/RMISocketFactory.java, java/rmi/server/RemoteCall.java, java/rmi/server/RemoteObject.java, java/rmi/server/RemoteRef.java, java/rmi/server/RemoteServer.java, java/rmi/server/RemoteStub.java, java/rmi/server/ServerCloneException.java, java/rmi/server/ServerNotActiveException.java, java/rmi/server/ServerRef.java, java/rmi/server/Skeleton.java, java/rmi/server/SkeletonMismatchException.java, java/rmi/server/SkeletonNotFoundException.java, java/rmi/server/SocketSecurityException.java, java/rmi/server/UID.java, java/rmi/server/UnicastRemoteObject.java, java/rmi/server/Unreferenced.java, gnu/java/rmi/dgc/DGCImpl.java, gnu/java/rmi/dgc/DGCImpl_Skel.java, gnu/java/rmi/dgc/DGCImpl_Stub.java, gnu/java/rmi/registry/RegistryImpl.java, gnu/java/rmi/registry/RegistryImpl_Skel.java, gnu/java/rmi/registry/RegistryImpl_Stub.java, gnu/java/rmi/rmic/RMIC.java, gnu/java/rmi/rmic/TabbedWriter.java, gnu/java/rmi/server/ProtocolConstants.java, gnu/java/rmi/server/RMIDefaultSocketFactory.java, gnu/java/rmi/server/RMIHashes.java, gnu/java/rmi/server/RMIObjectInputStream.java, gnu/java/rmi/server/RMIObjectOutputStream.java, gnu/java/rmi/server/UnicastConnection.java, gnu/java/rmi/server/UnicastConnectionManager.java, gnu/java/rmi/server/UnicastRef.java, gnu/java/rmi/server/UnicastRemoteCall.java, gnu/java/rmi/server/UnicastRemoteStub.java, gnu/java/rmi/server/UnicastServer.java, gnu/java/rmi/server/UnicastServerRef.java: RMI implementation from Kaffe. Relabelled classes to fit into Classpath tree. * Makefile.in: Rebuilt. * Makefile.am (rmi_java_source_files): New macro. (ordinary_java_source_files): Reference it. (bin_PROGRAMS): Added rmic and rmiregistry. (rmic_SOURCES): New macro. (EXTRA_rmic_SOURCES): Likewise. (rmic_LDFLAGS): Likewise. (rmic_LINK): Likewise. (rmic_LDADD): Likewise. (rmic_DEPENDENCIES): Likewise. (rmiregistry_SOURCES): New macro. (EXTRA_rmiregistry_SOURCES): Likewise. (rmiregistry_LDFLAGS): Likewise. (rmiregistry_LINK): Likewise. (rmiregistry_LDADD): Likewise. (rmiregistry_DEPENDENCIES): Likewise. From-SVN: r45218
This commit is contained in:
parent
c5bb59c118
commit
83e7315b5f
88 changed files with 8583 additions and 49 deletions
43
libjava/java/rmi/AccessException.java
Normal file
43
libjava/java/rmi/AccessException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class AccessException
|
||||
extends RemoteException {
|
||||
|
||||
public static final long serialVersionUID = 6314925228044966088l;
|
||||
|
||||
public AccessException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public AccessException(String s, Exception e) {
|
||||
super (s, e);
|
||||
}
|
||||
|
||||
}
|
41
libjava/java/rmi/AlreadyBoundException.java
Normal file
41
libjava/java/rmi/AlreadyBoundException.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class AlreadyBoundException
|
||||
extends Exception {
|
||||
|
||||
public AlreadyBoundException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public AlreadyBoundException(String s) {
|
||||
super (s);
|
||||
}
|
||||
|
||||
}
|
42
libjava/java/rmi/ConnectException.java
Normal file
42
libjava/java/rmi/ConnectException.java
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class ConnectException
|
||||
extends RemoteException {
|
||||
|
||||
|
||||
public ConnectException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ConnectException(String s, Exception e) {
|
||||
super (s, e);
|
||||
}
|
||||
|
||||
}
|
42
libjava/java/rmi/ConnectIOException.java
Normal file
42
libjava/java/rmi/ConnectIOException.java
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class ConnectIOException
|
||||
extends RemoteException {
|
||||
|
||||
|
||||
public ConnectIOException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ConnectIOException(String s, Exception e) {
|
||||
super (s, e);
|
||||
}
|
||||
|
||||
}
|
42
libjava/java/rmi/MarshalException.java
Normal file
42
libjava/java/rmi/MarshalException.java
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class MarshalException
|
||||
extends RemoteException {
|
||||
|
||||
|
||||
public MarshalException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public MarshalException(String s, Exception e) {
|
||||
super (s, e);
|
||||
}
|
||||
|
||||
}
|
51
libjava/java/rmi/MarshalledObject.java
Normal file
51
libjava/java/rmi/MarshalledObject.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public final class MarshalledObject
|
||||
extends Object implements Serializable {
|
||||
|
||||
public MarshalledObject(Object obj) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public Object get() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
70
libjava/java/rmi/Naming.java
Normal file
70
libjava/java/rmi/Naming.java
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.rmi.registry.Registry;
|
||||
import java.rmi.registry.LocateRegistry;
|
||||
|
||||
public final class Naming {
|
||||
|
||||
public static Remote lookup(String name) throws NotBoundException, MalformedURLException, RemoteException {
|
||||
URL u = new URL("http:" + name);
|
||||
return (getRegistry(u).lookup(u.getFile().substring(1)));
|
||||
}
|
||||
|
||||
public static void bind(String name, Remote obj) throws AlreadyBoundException, MalformedURLException, RemoteException {
|
||||
URL u = new URL("http:" + name);
|
||||
getRegistry(u).bind(u.getFile().substring(1), obj);
|
||||
}
|
||||
|
||||
public static void unbind(String name) throws RemoteException, NotBoundException, MalformedURLException {
|
||||
URL u = new URL("http:" + name);
|
||||
getRegistry(u).unbind(u.getFile().substring(1));
|
||||
}
|
||||
|
||||
public static void rebind(String name, Remote obj) throws RemoteException, MalformedURLException {
|
||||
URL u = new URL("http:" + name);
|
||||
getRegistry(u).rebind(u.getFile().substring(1), obj);
|
||||
}
|
||||
|
||||
public static String[] list(String name) throws RemoteException, MalformedURLException {
|
||||
return (getRegistry(new URL("http:" + name)).list());
|
||||
}
|
||||
|
||||
private static Registry getRegistry(URL u) throws RemoteException {
|
||||
if (u.getPort() == -1) {
|
||||
return (LocateRegistry.getRegistry(u.getHost()));
|
||||
}
|
||||
else {
|
||||
return (LocateRegistry.getRegistry(u.getHost(), u.getPort()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
39
libjava/java/rmi/NoSuchObjectException.java
Normal file
39
libjava/java/rmi/NoSuchObjectException.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class NoSuchObjectException
|
||||
extends RemoteException {
|
||||
|
||||
public static final long serialVersionUID = 6619395951570472985L;
|
||||
|
||||
public NoSuchObjectException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/NotBoundException.java
Normal file
43
libjava/java/rmi/NotBoundException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class NotBoundException
|
||||
extends Exception {
|
||||
|
||||
public static final long serialVersionUID = -1857741824849069317l;
|
||||
|
||||
public NotBoundException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public NotBoundException(String s) {
|
||||
super (s);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/RMISecurityException.java
Normal file
43
libjava/java/rmi/RMISecurityException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
import java.lang.SecurityException;
|
||||
|
||||
public class RMISecurityException
|
||||
extends SecurityException {
|
||||
|
||||
public RMISecurityException(String n) {
|
||||
super(n);
|
||||
}
|
||||
|
||||
public RMISecurityException(String n, String a) {
|
||||
super(n);
|
||||
}
|
||||
|
||||
}
|
139
libjava/java/rmi/RMISecurityManager.java
Normal file
139
libjava/java/rmi/RMISecurityManager.java
Normal file
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.lang.Thread;
|
||||
import java.lang.Class;
|
||||
import java.lang.SecurityManager;
|
||||
import java.net.InetAddress;
|
||||
import java.security.Permission;
|
||||
|
||||
public class RMISecurityManager extends SecurityManager {
|
||||
|
||||
public RMISecurityManager() {
|
||||
}
|
||||
|
||||
public void checkAccept(String host, int port) {
|
||||
}
|
||||
|
||||
public void checkAccess(Thread g) {
|
||||
}
|
||||
|
||||
public void checkAccess(ThreadGroup g) {
|
||||
}
|
||||
|
||||
public void checkAwtEventQueueAccess() {
|
||||
}
|
||||
|
||||
public void checkConnect(String host, int port) {
|
||||
}
|
||||
|
||||
public void checkConnect(String host, int port, Object context) {
|
||||
}
|
||||
|
||||
public void checkCreateClassLoader() {
|
||||
}
|
||||
|
||||
public void checkDelete(String file) {
|
||||
}
|
||||
|
||||
public void checkExec(String cmd) {
|
||||
}
|
||||
|
||||
public void checkExit(int status) {
|
||||
}
|
||||
|
||||
public void checkLink(String lib) {
|
||||
}
|
||||
|
||||
public void checkListen(int port) {
|
||||
}
|
||||
|
||||
public void checkMemberAccess ( Class clazz, int which ) {
|
||||
}
|
||||
|
||||
public void checkMulticast(InetAddress maddr) {
|
||||
}
|
||||
|
||||
public void checkMulticast(InetAddress maddr, byte ttl) {
|
||||
}
|
||||
|
||||
public void checkPackageAccess(String pkg) {
|
||||
}
|
||||
|
||||
public void checkPackageDefinition(String pkg) {
|
||||
}
|
||||
|
||||
public void checkPermission(Permission perm) {
|
||||
}
|
||||
|
||||
public void checkPermission(Permission perm, Object context) {
|
||||
}
|
||||
|
||||
public void checkPrintJobAccess() {
|
||||
}
|
||||
|
||||
public void checkPropertiesAccess() {
|
||||
}
|
||||
|
||||
public void checkPropertyAccess(String key) {
|
||||
}
|
||||
|
||||
/* public void checkPropertyAccess(String key, String def) {
|
||||
}*/
|
||||
|
||||
public void checkRead(FileDescriptor fd) {
|
||||
}
|
||||
|
||||
public void checkRead(String file) {
|
||||
}
|
||||
|
||||
public void checkRead(String file, Object context) {
|
||||
}
|
||||
|
||||
public void checkSecurityAccess(String action) {
|
||||
}
|
||||
|
||||
public void checkSetFactory() {
|
||||
}
|
||||
|
||||
public void checkSystemClipboardAccess() {
|
||||
}
|
||||
|
||||
public boolean checkTopLevelWindow(Object window) {
|
||||
return (true);
|
||||
}
|
||||
|
||||
public void checkWrite(FileDescriptor fd) {
|
||||
}
|
||||
|
||||
public void checkWrite(String file) {
|
||||
}
|
||||
|
||||
}
|
31
libjava/java/rmi/Remote.java
Normal file
31
libjava/java/rmi/Remote.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public interface Remote {
|
||||
}
|
85
libjava/java/rmi/RemoteException.java
Normal file
85
libjava/java/rmi/RemoteException.java
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
import java.lang.Throwable;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
||||
public class RemoteException
|
||||
extends IOException {
|
||||
|
||||
public static final long serialVersionUID = -5148567311918794206l;
|
||||
|
||||
public Throwable detail;
|
||||
|
||||
public RemoteException() {
|
||||
super();
|
||||
detail = null;
|
||||
}
|
||||
|
||||
public RemoteException(String s) {
|
||||
super(s);
|
||||
detail = null;
|
||||
}
|
||||
|
||||
public RemoteException(String s, Throwable e) {
|
||||
super(s);
|
||||
detail = e;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
if (detail == null) {
|
||||
return (super.getMessage());
|
||||
}
|
||||
else {
|
||||
return (super.getMessage() + "; nested exception is: " + detail.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void printStackTrace(PrintStream s) {
|
||||
if (detail != null) {
|
||||
detail.printStackTrace(s);
|
||||
}
|
||||
super.printStackTrace(s);
|
||||
}
|
||||
|
||||
public void printStackTrace(PrintWriter s) {
|
||||
if (detail != null) {
|
||||
detail.printStackTrace(s);
|
||||
}
|
||||
super.printStackTrace(s);
|
||||
}
|
||||
|
||||
public void printStackTrace() {
|
||||
printStackTrace(System.err);
|
||||
}
|
||||
|
||||
}
|
37
libjava/java/rmi/ServerError.java
Normal file
37
libjava/java/rmi/ServerError.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class ServerError
|
||||
extends RemoteException {
|
||||
|
||||
public ServerError(String s, Error e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/ServerException.java
Normal file
43
libjava/java/rmi/ServerException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class ServerException
|
||||
extends RemoteException {
|
||||
|
||||
public static final long serialVersionUID = -4775845313121906682l;
|
||||
|
||||
public ServerException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ServerException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
37
libjava/java/rmi/ServerRuntimeException.java
Normal file
37
libjava/java/rmi/ServerRuntimeException.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class ServerRuntimeException
|
||||
extends RemoteException {
|
||||
|
||||
public ServerRuntimeException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
41
libjava/java/rmi/StubNotFoundException.java
Normal file
41
libjava/java/rmi/StubNotFoundException.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class StubNotFoundException
|
||||
extends RemoteException {
|
||||
|
||||
public StubNotFoundException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public StubNotFoundException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
41
libjava/java/rmi/UnexpectedException.java
Normal file
41
libjava/java/rmi/UnexpectedException.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class UnexpectedException
|
||||
extends RemoteException {
|
||||
|
||||
public UnexpectedException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public UnexpectedException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
41
libjava/java/rmi/UnknownHostException.java
Normal file
41
libjava/java/rmi/UnknownHostException.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class UnknownHostException
|
||||
extends RemoteException {
|
||||
|
||||
public UnknownHostException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public UnknownHostException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/UnmarshalException.java
Normal file
43
libjava/java/rmi/UnmarshalException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi;
|
||||
|
||||
public class UnmarshalException
|
||||
extends RemoteException {
|
||||
|
||||
public static final long serialVersionUID = 594380845140740218l;
|
||||
|
||||
public UnmarshalException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public UnmarshalException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
93
libjava/java/rmi/activation/Activatable.java
Normal file
93
libjava/java/rmi/activation/Activatable.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.server.RemoteServer;
|
||||
import java.rmi.server.RMIClientSocketFactory;
|
||||
import java.rmi.server.RMIServerSocketFactory;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.NoSuchObjectException;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public abstract class Activatable
|
||||
extends RemoteServer {
|
||||
|
||||
protected Activatable(String location, MarshalledObject data, boolean restart, int port) throws ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
protected Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
protected Activatable(ActivationID id, int port) throws RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
protected Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
protected ActivationID getID() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static Remote register(ActivationDesc desc) throws UnknownGroupException, ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static boolean inactive(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static void unregister(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static ActivationID exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) throws ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static ActivationID exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws ActivationException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static Remote exportObject(Remote obj, ActivationID id, int port) throws RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static Remote exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/activation/ActivateFailedException.java
Normal file
43
libjava/java/rmi/activation/ActivateFailedException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class ActivateFailedException
|
||||
extends RemoteException {
|
||||
|
||||
public ActivateFailedException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ActivateFailedException(String s, Exception ex) {
|
||||
super(s, ex);
|
||||
}
|
||||
|
||||
}
|
102
libjava/java/rmi/activation/ActivationDesc.java
Normal file
102
libjava/java/rmi/activation/ActivationDesc.java
Normal file
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public final class ActivationDesc
|
||||
implements Serializable {
|
||||
|
||||
private ActivationGroupID groupid;
|
||||
private String classname;
|
||||
private String location;
|
||||
private MarshalledObject data;
|
||||
private boolean restart;
|
||||
|
||||
public ActivationDesc(String className, String location, MarshalledObject data) throws ActivationException {
|
||||
this(ActivationGroup.currentGroupID(), className, location, data, false);
|
||||
}
|
||||
|
||||
public ActivationDesc(String className, String location, MarshalledObject data, boolean restart) throws ActivationException {
|
||||
this(ActivationGroup.currentGroupID(), className, location, data, restart);
|
||||
}
|
||||
|
||||
public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data) {
|
||||
this(groupID, className, location, data, false);
|
||||
}
|
||||
|
||||
public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data, boolean restart) {
|
||||
this.groupid = groupID;
|
||||
this.classname = className;
|
||||
this.location = location;
|
||||
this.data = data;
|
||||
this.restart = restart;
|
||||
}
|
||||
|
||||
public ActivationGroupID getGroupID() {
|
||||
return (groupid);
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return (classname);
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return (location);
|
||||
}
|
||||
|
||||
public MarshalledObject getData() {
|
||||
return (data);
|
||||
}
|
||||
|
||||
public boolean getRestartMode() {
|
||||
return (restart);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof ActivationDesc)) {
|
||||
return (false);
|
||||
}
|
||||
ActivationDesc that = (ActivationDesc)obj;
|
||||
|
||||
if (this.groupid.equals(that.groupid) &&
|
||||
this.classname.equals(that.classname) &&
|
||||
this.location.equals(that.location) &&
|
||||
this.data.equals(that.data) &&
|
||||
this.restart == that.restart) {
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (groupid.hashCode() ^ classname.hashCode() ^ location.hashCode() ^ data.hashCode());
|
||||
}
|
||||
|
||||
}
|
78
libjava/java/rmi/activation/ActivationException.java
Normal file
78
libjava/java/rmi/activation/ActivationException.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
public class ActivationException
|
||||
extends Exception {
|
||||
|
||||
public Throwable detail;
|
||||
|
||||
public ActivationException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ActivationException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ActivationException(String s, Throwable ex) {
|
||||
super(s);
|
||||
detail = ex;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
if (detail == null) {
|
||||
return (super.getMessage());
|
||||
}
|
||||
else {
|
||||
return (super.getMessage() + ":" + detail.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void printStackTrace(PrintStream s) {
|
||||
if (detail != null) {
|
||||
detail.printStackTrace(s);
|
||||
}
|
||||
super.printStackTrace(s);
|
||||
}
|
||||
|
||||
public void printStackTrace() {
|
||||
printStackTrace(System.err);
|
||||
}
|
||||
|
||||
public void printStackTrace(PrintWriter s) {
|
||||
if (detail != null) {
|
||||
detail.printStackTrace(s);
|
||||
}
|
||||
super.printStackTrace(s);
|
||||
}
|
||||
|
||||
}
|
73
libjava/java/rmi/activation/ActivationGroup.java
Normal file
73
libjava/java/rmi/activation/ActivationGroup.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.server.UnicastRemoteObject;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public abstract class ActivationGroup
|
||||
extends UnicastRemoteObject
|
||||
implements ActivationInstantiator {
|
||||
|
||||
protected ActivationGroup(ActivationGroupID groupID) throws RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public boolean inactiveObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public abstract void activeObject(ActivationID id, Remote obj) throws ActivationException, UnknownObjectException, RemoteException;
|
||||
|
||||
public static ActivationGroup createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) throws ActivationException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static ActivationGroupID currentGroupID() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static void setSystem(ActivationSystem system) throws ActivationException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static ActivationSystem getSystem() throws ActivationException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
protected void activeObject(ActivationID id, MarshalledObject mobj) throws ActivationException, UnknownObjectException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
protected void inactiveGroup() throws UnknownGroupException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
120
libjava/java/rmi/activation/ActivationGroupDesc.java
Normal file
120
libjava/java/rmi/activation/ActivationGroupDesc.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public final class ActivationGroupDesc
|
||||
implements Serializable {
|
||||
|
||||
public static class CommandEnvironment
|
||||
implements Serializable {
|
||||
|
||||
private String cmdpath;
|
||||
private String[] argv;
|
||||
|
||||
public CommandEnvironment(String cmdpath, String[] argv) {
|
||||
this.cmdpath = cmdpath;
|
||||
this.argv = argv;
|
||||
}
|
||||
|
||||
public String getCommandPath() {
|
||||
return (cmdpath);
|
||||
}
|
||||
|
||||
public String[] getCommandOptions() {
|
||||
return (argv);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof CommandEnvironment)) {
|
||||
return (false);
|
||||
}
|
||||
CommandEnvironment that = (CommandEnvironment)obj;
|
||||
|
||||
if (!this.cmdpath.equals(that.cmdpath)) {
|
||||
return (false);
|
||||
}
|
||||
|
||||
int len = this.argv.length;
|
||||
if (len != that.argv.length) {
|
||||
return (false);
|
||||
}
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (!this.argv[i].equals(that.argv[i])) {
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (cmdpath.hashCode()); // Not a very good hash code.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public MarshalledObject getData() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public Properties getPropertyOverrides() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public ActivationGroupDesc.CommandEnvironment getCommandEnvironment() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
59
libjava/java/rmi/activation/ActivationGroupID.java
Normal file
59
libjava/java/rmi/activation/ActivationGroupID.java
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ActivationGroupID
|
||||
implements Serializable {
|
||||
|
||||
private ActivationSystem system;
|
||||
|
||||
public ActivationGroupID(ActivationSystem system) {
|
||||
this.system = system;
|
||||
}
|
||||
|
||||
public ActivationSystem getSystem() {
|
||||
return (system);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (system.hashCode());
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ActivationGroupID) {
|
||||
ActivationGroupID that = (ActivationGroupID)obj;
|
||||
if (this.system.equals(that.system)) {
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
}
|
61
libjava/java/rmi/activation/ActivationID.java
Normal file
61
libjava/java/rmi/activation/ActivationID.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class ActivationID
|
||||
implements Serializable {
|
||||
|
||||
private Activator activator;
|
||||
|
||||
public ActivationID(Activator activator) {
|
||||
this.activator = activator;
|
||||
}
|
||||
|
||||
public Remote activate(boolean force) throws ActivationException, UnknownObjectException, RemoteException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (activator.hashCode());
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ActivationID) {
|
||||
ActivationID that = (ActivationID)obj;
|
||||
if (this.activator.equals(that.activator)) {
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
}
|
39
libjava/java/rmi/activation/ActivationInstantiator.java
Normal file
39
libjava/java/rmi/activation/ActivationInstantiator.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public interface ActivationInstantiator
|
||||
extends Remote {
|
||||
|
||||
public MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException;
|
||||
|
||||
}
|
41
libjava/java/rmi/activation/ActivationMonitor.java
Normal file
41
libjava/java/rmi/activation/ActivationMonitor.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public interface ActivationMonitor
|
||||
extends Remote {
|
||||
|
||||
public void inactiveObject(ActivationID id) throws UnknownObjectException, RemoteException;
|
||||
public void activeObject(ActivationID id, MarshalledObject obj) throws UnknownObjectException, RemoteException;
|
||||
public void inactiveGroup(ActivationGroupID id, long incarnation) throws UnknownGroupException, RemoteException;
|
||||
|
||||
}
|
49
libjava/java/rmi/activation/ActivationSystem.java
Normal file
49
libjava/java/rmi/activation/ActivationSystem.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public interface ActivationSystem
|
||||
extends Remote {
|
||||
|
||||
public static final int SYSTEM_PORT = 0; // XXX
|
||||
|
||||
public ActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteException;
|
||||
public void unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException;
|
||||
public ActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException, RemoteException;
|
||||
public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteException;
|
||||
public void unregisterGroup(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException;
|
||||
public void shutdown() throws RemoteException;
|
||||
public ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException, UnknownObjectException, UnknownGroupException, RemoteException;
|
||||
public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) throws ActivationException, UnknownGroupException, RemoteException;
|
||||
public ActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException;
|
||||
public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException;
|
||||
|
||||
}
|
39
libjava/java/rmi/activation/Activator.java
Normal file
39
libjava/java/rmi/activation/Activator.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.MarshalledObject;
|
||||
|
||||
public interface Activator
|
||||
extends Remote {
|
||||
|
||||
public MarshalledObject activate(ActivationID id, boolean force) throws ActivationException, UnknownObjectException, RemoteException;
|
||||
|
||||
}
|
37
libjava/java/rmi/activation/UnknownGroupException.java
Normal file
37
libjava/java/rmi/activation/UnknownGroupException.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
public class UnknownGroupException
|
||||
extends ActivationException {
|
||||
|
||||
public UnknownGroupException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
}
|
37
libjava/java/rmi/activation/UnknownObjectException.java
Normal file
37
libjava/java/rmi/activation/UnknownObjectException.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.activation;
|
||||
|
||||
public class UnknownObjectException
|
||||
extends ActivationException {
|
||||
|
||||
public UnknownObjectException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
}
|
41
libjava/java/rmi/dgc/DGC.java
Normal file
41
libjava/java/rmi/dgc/DGC.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.dgc;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.server.ObjID;
|
||||
|
||||
public interface DGC
|
||||
extends Remote {
|
||||
|
||||
public Lease dirty(ObjID[] ids, long sequenceNum, Lease lease) throws RemoteException;
|
||||
|
||||
public void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) throws RemoteException;
|
||||
|
||||
}
|
58
libjava/java/rmi/dgc/Lease.java
Normal file
58
libjava/java/rmi/dgc/Lease.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.dgc;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.rmi.dgc.VMID;
|
||||
|
||||
public final class Lease
|
||||
implements Serializable {
|
||||
|
||||
static final long serialVersionUID = -5713411624328831948L;
|
||||
|
||||
private VMID vmid;
|
||||
private long value;
|
||||
|
||||
public Lease(VMID id, long duration) {
|
||||
vmid = id;
|
||||
value = duration;
|
||||
}
|
||||
|
||||
public VMID getVMID() {
|
||||
return (vmid);
|
||||
}
|
||||
|
||||
public long getValue() {
|
||||
return (value);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ("[" + vmid.toString() + ", " + Long.toString(value) + "]");
|
||||
}
|
||||
|
||||
}
|
106
libjava/java/rmi/dgc/VMID.java
Normal file
106
libjava/java/rmi/dgc/VMID.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.dgc;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.rmi.server.UID;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public final class VMID
|
||||
implements Serializable {
|
||||
|
||||
static final long serialVersionUID = -538642295484486218L;
|
||||
static final boolean areWeUnique;
|
||||
static byte[] localAddr;
|
||||
|
||||
private byte[] addr;
|
||||
private UID uid;
|
||||
|
||||
static {
|
||||
byte[] addr;
|
||||
boolean awu = true;
|
||||
try {
|
||||
addr = InetAddress.getLocalHost().getAddress();
|
||||
if (addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1) {
|
||||
awu = false;
|
||||
}
|
||||
}
|
||||
catch (UnknownHostException _) {
|
||||
addr = new byte[]{ 127, 0, 0, 1 };
|
||||
awu = false;
|
||||
}
|
||||
localAddr = addr;
|
||||
areWeUnique = awu;
|
||||
}
|
||||
|
||||
public VMID() {
|
||||
addr = localAddr;
|
||||
uid = new UID();
|
||||
}
|
||||
|
||||
public static boolean isUnique() {
|
||||
return (areWeUnique);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (super.hashCode());
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof VMID)) {
|
||||
return (false);
|
||||
}
|
||||
VMID other = (VMID)obj;
|
||||
if (addr.length != other.addr.length) {
|
||||
return (false);
|
||||
}
|
||||
for (int i = addr.length - 1; i >= 0; i--) {
|
||||
if (addr[i] != other.addr[i]) {
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
return (uid.equals(other.uid));
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuffer buf = new StringBuffer("[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("]");
|
||||
|
||||
return (buf.toString());
|
||||
}
|
||||
|
||||
}
|
75
libjava/java/rmi/registry/LocateRegistry.java
Normal file
75
libjava/java/rmi/registry/LocateRegistry.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.registry;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.server.RMIClientSocketFactory;
|
||||
import java.rmi.server.RMIServerSocketFactory;
|
||||
import java.rmi.server.RMISocketFactory;
|
||||
import java.rmi.server.RemoteRef;
|
||||
import java.rmi.server.ObjID;
|
||||
import java.net.Socket;
|
||||
|
||||
import gnu.java.rmi.server.UnicastRef;
|
||||
import gnu.java.rmi.server.UnicastServerRef;
|
||||
import gnu.java.rmi.registry.RegistryImpl;
|
||||
import gnu.java.rmi.registry.RegistryImpl_Stub;
|
||||
|
||||
public final class LocateRegistry {
|
||||
|
||||
public static Registry getRegistry() throws RemoteException {
|
||||
return (getRegistry("localhost", Registry.REGISTRY_PORT));
|
||||
}
|
||||
|
||||
public static Registry getRegistry(int port) throws RemoteException {
|
||||
return (getRegistry("localhost", port));
|
||||
}
|
||||
|
||||
public static Registry getRegistry(String host) throws RemoteException {
|
||||
return (getRegistry(host, Registry.REGISTRY_PORT));
|
||||
}
|
||||
|
||||
public static Registry getRegistry(String host, int port) throws RemoteException {
|
||||
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));
|
||||
}
|
||||
|
||||
public static Registry createRegistry(int port) throws RemoteException {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
51
libjava/java/rmi/registry/Registry.java
Normal file
51
libjava/java/rmi/registry/Registry.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.registry;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.NotBoundException;
|
||||
import java.rmi.AccessException;
|
||||
import java.rmi.AlreadyBoundException;
|
||||
import java.rmi.Remote;
|
||||
|
||||
public interface Registry
|
||||
extends Remote {
|
||||
|
||||
public static int REGISTRY_PORT = 1099;
|
||||
|
||||
public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException;
|
||||
|
||||
public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException;
|
||||
|
||||
public void unbind(String name) throws RemoteException, NotBoundException, AccessException;
|
||||
|
||||
public void rebind(String name, Remote obj) throws RemoteException, AccessException;
|
||||
|
||||
public String[] list() throws RemoteException, AccessException;
|
||||
|
||||
}
|
39
libjava/java/rmi/registry/RegistryHandler.java
Normal file
39
libjava/java/rmi/registry/RegistryHandler.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.registry;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.UnknownHostException;
|
||||
|
||||
public interface RegistryHandler {
|
||||
|
||||
public Registry registryStub(String host, int port) throws RemoteException, UnknownHostException;
|
||||
|
||||
public Registry registryImpl(int port) throws RemoteException;
|
||||
|
||||
}
|
43
libjava/java/rmi/server/ExportException.java
Normal file
43
libjava/java/rmi/server/ExportException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class ExportException
|
||||
extends RemoteException {
|
||||
|
||||
public ExportException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ExportException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
44
libjava/java/rmi/server/LoaderHandler.java
Normal file
44
libjava/java/rmi/server/LoaderHandler.java
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
public interface LoaderHandler {
|
||||
|
||||
public static final String packagePrefix = "";
|
||||
|
||||
public Class loadClass(String name) throws MalformedURLException, ClassNotFoundException;
|
||||
|
||||
public Class loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException;
|
||||
|
||||
public Object getSecurityContext(ClassLoader loader);
|
||||
|
||||
}
|
92
libjava/java/rmi/server/LogStream.java
Normal file
92
libjava/java/rmi/server/LogStream.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class LogStream
|
||||
extends PrintStream {
|
||||
|
||||
public static final int SILENT = 0;
|
||||
public static final int BRIEF = 1;
|
||||
public static final int VERBOSE = 2;
|
||||
|
||||
private static PrintStream defStream;
|
||||
|
||||
private LogStream(OutputStream s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public static LogStream log(String name) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static PrintStream getDefaultStream() {
|
||||
return (defStream);
|
||||
}
|
||||
|
||||
public static void setDefaultStream(PrintStream s) {
|
||||
defStream = s;
|
||||
}
|
||||
|
||||
public OutputStream getOutputStream() {
|
||||
return (out);
|
||||
}
|
||||
|
||||
public void setOutputStream(OutputStream s) {
|
||||
out = s;
|
||||
}
|
||||
|
||||
public void write(int b) {
|
||||
super.write(b);
|
||||
}
|
||||
|
||||
public void write(byte[] b, int off, int len) {
|
||||
super.write(b, off, len);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static int parseLevel(String s) {
|
||||
if (s.equalsIgnoreCase("silent")) {
|
||||
return (SILENT);
|
||||
}
|
||||
if (s.equalsIgnoreCase("brief")) {
|
||||
return (BRIEF);
|
||||
}
|
||||
if (s.equalsIgnoreCase("verbose")) {
|
||||
return (VERBOSE);
|
||||
}
|
||||
return (SILENT);
|
||||
}
|
||||
|
||||
}
|
95
libjava/java/rmi/server/ObjID.java
Normal file
95
libjava/java/rmi/server/ObjID.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.ObjectOutput;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.IOException;
|
||||
import java.lang.Math;
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.util.Random;
|
||||
|
||||
public final class ObjID
|
||||
implements Serializable {
|
||||
|
||||
static final long serialVersionUID = -6386392263968365220L;
|
||||
|
||||
private static long next = 0x8000000000000000L;
|
||||
private static final Object lock = ObjID.class;
|
||||
|
||||
public static final int REGISTRY_ID = 0;
|
||||
public static final int ACTIVATOR_ID = 1;
|
||||
public static final int DGC_ID = 2;
|
||||
|
||||
private long objNum;
|
||||
private UID space;
|
||||
|
||||
public ObjID() {
|
||||
synchronized (lock) {
|
||||
objNum = next++;
|
||||
}
|
||||
space = new UID();
|
||||
}
|
||||
|
||||
public ObjID(int num) {
|
||||
objNum = (long)num;
|
||||
space = new UID((short)0);
|
||||
}
|
||||
|
||||
public void write(ObjectOutput out) throws IOException {
|
||||
DataOutput dout = (DataOutput)out;
|
||||
dout.writeLong(objNum);
|
||||
space.write(dout);
|
||||
}
|
||||
|
||||
public static ObjID read(ObjectInput in) throws IOException {
|
||||
DataInput din = (DataInput)in;
|
||||
ObjID id = new ObjID();
|
||||
id.objNum = din.readLong();
|
||||
id.space = UID.read(din);
|
||||
return (id);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return ((int)objNum);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ObjID && this.objNum == ((ObjID)obj).objNum) {
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ("[objNum: " + objNum + ", " + space + "]");
|
||||
}
|
||||
|
||||
}
|
46
libjava/java/rmi/server/Operation.java
Normal file
46
libjava/java/rmi/server/Operation.java
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
public class Operation {
|
||||
|
||||
private String operation;
|
||||
|
||||
public Operation(String op) {
|
||||
operation = op;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return (operation);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return (operation);
|
||||
}
|
||||
|
||||
}
|
92
libjava/java/rmi/server/RMIClassLoader.java
Normal file
92
libjava/java/rmi/server/RMIClassLoader.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.io.IOException;
|
||||
import java.io.DataInputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class RMIClassLoader {
|
||||
|
||||
static private class MyClassLoader extends ClassLoader {
|
||||
|
||||
Class defineClass(String name, byte[] data) {
|
||||
return (defineClass(name, data, 0, data.length));
|
||||
}
|
||||
}
|
||||
static private MyClassLoader loader = new MyClassLoader();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public static Class loadClass(String name) throws MalformedURLException, ClassNotFoundException {
|
||||
return (loadClass(System.getProperty("java.rmi.server.codebase"), name));
|
||||
}
|
||||
|
||||
public static Class loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException {
|
||||
URL u = new URL(codebase, name + ".class");
|
||||
try {
|
||||
URLConnection conn = u.openConnection();
|
||||
DataInputStream strm = new DataInputStream(conn.getInputStream());
|
||||
byte data[] = new byte[conn.getContentLength()];
|
||||
strm.readFully(data);
|
||||
return (loader.defineClass(name, data));
|
||||
}
|
||||
catch (IOException _) {
|
||||
throw new ClassNotFoundException(name);
|
||||
}
|
||||
}
|
||||
|
||||
public static Class loadClass(String codebase, String name) throws MalformedURLException, ClassNotFoundException {
|
||||
StringTokenizer tok = new StringTokenizer(codebase, ":");
|
||||
while (tok.hasMoreTokens()) {
|
||||
try {
|
||||
return (loadClass(new URL(tok.nextToken()), name));
|
||||
}
|
||||
catch (ClassNotFoundException _) {
|
||||
// Ignore - try the next one.
|
||||
}
|
||||
}
|
||||
throw new ClassNotFoundException(name);
|
||||
}
|
||||
|
||||
public static String getClassAnnotation(Class cl) {
|
||||
return (null); // We don't yet do this.
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public static Object getSecurityContext(ClassLoader loader) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
37
libjava/java/rmi/server/RMIClientSocketFactory.java
Normal file
37
libjava/java/rmi/server/RMIClientSocketFactory.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface RMIClientSocketFactory {
|
||||
|
||||
public Socket createSocket(String host, int port) throws IOException;
|
||||
|
||||
}
|
34
libjava/java/rmi/server/RMIFailureHandler.java
Normal file
34
libjava/java/rmi/server/RMIFailureHandler.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
public interface RMIFailureHandler {
|
||||
|
||||
public boolean failure(Exception ex);
|
||||
|
||||
}
|
37
libjava/java/rmi/server/RMIServerSocketFactory.java
Normal file
37
libjava/java/rmi/server/RMIServerSocketFactory.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.net.ServerSocket;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface RMIServerSocketFactory {
|
||||
|
||||
public ServerSocket createServerSocket(int port) throws IOException;
|
||||
|
||||
}
|
74
libjava/java/rmi/server/RMISocketFactory.java
Normal file
74
libjava/java/rmi/server/RMISocketFactory.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.net.ServerSocket;
|
||||
import java.io.IOException;
|
||||
import gnu.java.rmi.server.RMIDefaultSocketFactory;
|
||||
|
||||
public abstract class RMISocketFactory
|
||||
implements RMIClientSocketFactory, RMIServerSocketFactory {
|
||||
|
||||
static private RMISocketFactory defaultFactory;
|
||||
static private RMISocketFactory currentFactory;
|
||||
static private RMIFailureHandler currentHandler;
|
||||
|
||||
static {
|
||||
defaultFactory = new RMIDefaultSocketFactory();
|
||||
currentFactory = defaultFactory;
|
||||
}
|
||||
|
||||
public RMISocketFactory() {
|
||||
}
|
||||
|
||||
public abstract Socket createSocket(String host, int port) throws IOException;
|
||||
|
||||
public abstract ServerSocket createServerSocket(int port) throws IOException;
|
||||
|
||||
public static void setSocketFactory(RMISocketFactory fac) throws IOException {
|
||||
currentFactory = fac;
|
||||
}
|
||||
|
||||
public static RMISocketFactory getSocketFactory() {
|
||||
return (currentFactory);
|
||||
}
|
||||
|
||||
public static RMISocketFactory getDefaultSocketFactory() {
|
||||
return (defaultFactory);
|
||||
}
|
||||
|
||||
public static void setFailureHandler(RMIFailureHandler fh) {
|
||||
currentHandler = fh;
|
||||
}
|
||||
|
||||
public static RMIFailureHandler getFailureHandler() {
|
||||
return (currentHandler);
|
||||
}
|
||||
|
||||
}
|
46
libjava/java/rmi/server/RemoteCall.java
Normal file
46
libjava/java/rmi/server/RemoteCall.java
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.lang.Exception;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectOutput;
|
||||
import java.io.ObjectInput;
|
||||
import java.io.StreamCorruptedException;
|
||||
|
||||
public interface RemoteCall {
|
||||
|
||||
public ObjectOutput getOutputStream() throws IOException;
|
||||
public void releaseOutputStream() throws IOException;
|
||||
public ObjectInput getInputStream() throws IOException;
|
||||
public void releaseInputStream() throws IOException;
|
||||
public ObjectOutput getResultStream(boolean success) throws IOException, StreamCorruptedException;
|
||||
public void executeCall() throws Exception;
|
||||
public void done() throws IOException;
|
||||
|
||||
}
|
119
libjava/java/rmi/server/RemoteObject.java
Normal file
119
libjava/java/rmi/server/RemoteObject.java
Normal file
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.NoSuchObjectException;
|
||||
import java.rmi.UnmarshalException;
|
||||
import java.rmi.server.RemoteRef;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.ClassNotFoundException;
|
||||
import java.lang.InstantiationException;
|
||||
import java.lang.IllegalAccessException;
|
||||
|
||||
public abstract class RemoteObject
|
||||
implements Remote, Serializable {
|
||||
|
||||
public static final long serialVersionUID = -3215090123894869218l;
|
||||
|
||||
protected transient RemoteRef ref;
|
||||
|
||||
protected RemoteObject() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
protected RemoteObject(RemoteRef newref) {
|
||||
ref = newref;
|
||||
}
|
||||
|
||||
public RemoteRef getRef() {
|
||||
return (ref);
|
||||
}
|
||||
|
||||
public static Remote toStub(Remote obj) throws NoSuchObjectException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
if (ref == null) {
|
||||
return (0);
|
||||
}
|
||||
else {
|
||||
return (ref.hashCode());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
// We only compare references.
|
||||
return (this == obj);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return (ref.toString());
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
String cname = in.readUTF();
|
||||
if (!cname.equals("")) {
|
||||
cname = RemoteRef.packagePrefix + '.' + cname;
|
||||
try {
|
||||
Class cls = Class.forName(cname);
|
||||
ref = (RemoteRef)cls.newInstance();
|
||||
}
|
||||
catch (InstantiationException e1) {
|
||||
throw new UnmarshalException("failed to create ref");
|
||||
}
|
||||
catch (IllegalAccessException e2) {
|
||||
throw new UnmarshalException("failed to create ref");
|
||||
}
|
||||
ref.readExternal(in);
|
||||
}
|
||||
else {
|
||||
ref = (RemoteRef)in.readObject();
|
||||
}
|
||||
}
|
||||
|
||||
private void writeObject(ObjectOutputStream out) throws IOException, ClassNotFoundException {
|
||||
if (ref == null) {
|
||||
throw new UnmarshalException("no ref to serialize");
|
||||
}
|
||||
String cname = ref.getRefClass(out);
|
||||
if (cname != null && cname.length() > 0) {
|
||||
out.writeUTF(cname);
|
||||
ref.writeExternal(out);
|
||||
}
|
||||
else {
|
||||
out.writeUTF("");
|
||||
out.writeObject(ref);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
libjava/java/rmi/server/RemoteRef.java
Normal file
51
libjava/java/rmi/server/RemoteRef.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.io.Externalizable;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.io.ObjectOutput;
|
||||
|
||||
public interface RemoteRef
|
||||
extends Externalizable {
|
||||
|
||||
public static final long serialVersionUID = 0;
|
||||
public static final String packagePrefix = "gnu.java.rmi.server";
|
||||
|
||||
public void invoke(RemoteCall call) throws Exception;
|
||||
public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception;
|
||||
public RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash) throws RemoteException;
|
||||
public void done(RemoteCall call) throws RemoteException;
|
||||
public boolean remoteEquals(RemoteRef ref);
|
||||
public int remoteHashCode();
|
||||
public String getRefClass(ObjectOutput out);
|
||||
public String remoteToString();
|
||||
|
||||
}
|
56
libjava/java/rmi/server/RemoteServer.java
Normal file
56
libjava/java/rmi/server/RemoteServer.java
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
public abstract class RemoteServer
|
||||
extends RemoteObject {
|
||||
|
||||
protected RemoteServer() {
|
||||
super();
|
||||
}
|
||||
|
||||
protected RemoteServer(RemoteRef ref) {
|
||||
super(ref);
|
||||
}
|
||||
|
||||
public static String getClientHost() throws ServerNotActiveException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static void setLog(OutputStream out) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static PrintStream getLog() {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
47
libjava/java/rmi/server/RemoteStub.java
Normal file
47
libjava/java/rmi/server/RemoteStub.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
public abstract class RemoteStub
|
||||
extends RemoteObject {
|
||||
|
||||
public static final long serialVersionUID = -1585587260594494182l;
|
||||
|
||||
protected RemoteStub() {
|
||||
super();
|
||||
}
|
||||
|
||||
protected RemoteStub(RemoteRef ref) {
|
||||
super(ref);
|
||||
}
|
||||
|
||||
protected static void setRef(RemoteStub stub, RemoteRef ref) {
|
||||
stub.ref = ref;
|
||||
}
|
||||
|
||||
}
|
76
libjava/java/rmi/server/ServerCloneException.java
Normal file
76
libjava/java/rmi/server/ServerCloneException.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.lang.CloneNotSupportedException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
public class ServerCloneException
|
||||
extends CloneNotSupportedException {
|
||||
|
||||
public Exception detail;
|
||||
|
||||
public ServerCloneException(String s) {
|
||||
super(s);
|
||||
detail = null;
|
||||
}
|
||||
|
||||
public ServerCloneException(String s, Exception e) {
|
||||
super(s);
|
||||
detail = e;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
if (detail != null) {
|
||||
return (super.getMessage() + ":" + detail.getMessage());
|
||||
}
|
||||
else {
|
||||
return (super.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void printStackTrace(PrintStream s) {
|
||||
if (detail != null) {
|
||||
detail.printStackTrace(s);
|
||||
}
|
||||
super.printStackTrace(s);
|
||||
}
|
||||
|
||||
public void printStackTrace() {
|
||||
printStackTrace(System.err);
|
||||
}
|
||||
|
||||
public void printStackTrace(PrintWriter s) {
|
||||
if (detail != null) {
|
||||
detail.printStackTrace(s);
|
||||
}
|
||||
super.printStackTrace(s);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/server/ServerNotActiveException.java
Normal file
43
libjava/java/rmi/server/ServerNotActiveException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.lang.Exception;
|
||||
|
||||
public class ServerNotActiveException
|
||||
extends Exception {
|
||||
|
||||
public ServerNotActiveException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ServerNotActiveException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/server/ServerRef.java
Normal file
43
libjava/java/rmi/server/ServerRef.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.server.RemoteStub;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.server.ServerNotActiveException;
|
||||
|
||||
public interface ServerRef
|
||||
extends RemoteRef {
|
||||
|
||||
public static final long serialVersionUID = 0;
|
||||
|
||||
public RemoteStub exportObject(Remote obj, Object data) throws RemoteException;
|
||||
public String getClientHost() throws ServerNotActiveException;
|
||||
|
||||
}
|
39
libjava/java/rmi/server/Skeleton.java
Normal file
39
libjava/java/rmi/server/Skeleton.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.lang.Exception;
|
||||
import java.rmi.server.RemoteCall;
|
||||
|
||||
public interface Skeleton {
|
||||
|
||||
public void dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) throws Exception;
|
||||
public Operation[] getOperations();
|
||||
|
||||
}
|
41
libjava/java/rmi/server/SkeletonMismatchException.java
Normal file
41
libjava/java/rmi/server/SkeletonMismatchException.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class SkeletonMismatchException
|
||||
extends RemoteException {
|
||||
|
||||
public static final long serialVersionUID = -7780460454818859281l;
|
||||
|
||||
public SkeletonMismatchException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/server/SkeletonNotFoundException.java
Normal file
43
libjava/java/rmi/server/SkeletonNotFoundException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class SkeletonNotFoundException
|
||||
extends RemoteException {
|
||||
|
||||
public SkeletonNotFoundException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public SkeletonNotFoundException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
43
libjava/java/rmi/server/SocketSecurityException.java
Normal file
43
libjava/java/rmi/server/SocketSecurityException.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.server.ExportException;
|
||||
|
||||
public class SocketSecurityException
|
||||
extends ExportException {
|
||||
|
||||
public SocketSecurityException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public SocketSecurityException(String s, Exception e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
}
|
120
libjava/java/rmi/server/UID.java
Normal file
120
libjava/java/rmi/server/UID.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.DataOutput;
|
||||
import java.io.DataInput;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
import java.lang.Thread;
|
||||
import java.lang.InterruptedException;
|
||||
|
||||
public final class UID
|
||||
implements Serializable {
|
||||
|
||||
public static final long serialVersionUID = 1086053664494604050L;
|
||||
|
||||
private static final Object lock = UID.class;
|
||||
private static long baseTime = System.currentTimeMillis();
|
||||
private static short nextCount = Short.MIN_VALUE;
|
||||
// This is sun's algorithm - don't ask me why ...
|
||||
private static final int uniqueNr = (new Object()).hashCode();
|
||||
|
||||
private int unique;
|
||||
private long time;
|
||||
private short count;
|
||||
|
||||
/**
|
||||
* This is sun's algorithm - don't ask me why ...
|
||||
*/
|
||||
public UID() {
|
||||
synchronized (lock) {
|
||||
if (count == Short.MAX_VALUE) {
|
||||
long newtime;
|
||||
for (;;) {
|
||||
newtime = System.currentTimeMillis();
|
||||
if (newtime - baseTime > 1000) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
catch (InterruptedException _) {
|
||||
}
|
||||
}
|
||||
baseTime = newtime;
|
||||
nextCount = Short.MIN_VALUE;
|
||||
}
|
||||
count = nextCount++;
|
||||
unique = uniqueNr;
|
||||
time = baseTime;
|
||||
}
|
||||
}
|
||||
|
||||
public UID(short num) {
|
||||
unique = (int)num;
|
||||
time = 0;
|
||||
count = 0;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (unique);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof UID) {
|
||||
UID uid = (UID)obj;
|
||||
if (this.unique == uid.unique &&
|
||||
this.time == uid.time &&
|
||||
this.count == uid.count) {
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ("[UID: " + unique + "," + time + "," + count + "]");
|
||||
}
|
||||
|
||||
public void write(DataOutput out) throws IOException {
|
||||
out.writeInt(unique);
|
||||
out.writeLong(time);
|
||||
out.writeShort(count);
|
||||
}
|
||||
|
||||
public static UID read(DataInput in) throws IOException {
|
||||
UID id = new UID();
|
||||
id.unique = in.readInt();
|
||||
id.time = in.readLong();
|
||||
id.count = in.readShort();
|
||||
return (id);
|
||||
}
|
||||
|
||||
}
|
76
libjava/java/rmi/server/UnicastRemoteObject.java
Normal file
76
libjava/java/rmi/server/UnicastRemoteObject.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.server.RemoteRef;
|
||||
import java.rmi.NoSuchObjectException;
|
||||
import gnu.java.rmi.server.UnicastServerRef;
|
||||
|
||||
public class UnicastRemoteObject
|
||||
extends RemoteServer {
|
||||
|
||||
protected UnicastRemoteObject() throws RemoteException {
|
||||
this(0);
|
||||
}
|
||||
|
||||
protected UnicastRemoteObject(int port) throws RemoteException {
|
||||
this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory());
|
||||
}
|
||||
|
||||
protected UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
|
||||
super(new UnicastServerRef(new ObjID(), port, ssf));
|
||||
}
|
||||
|
||||
protected UnicastRemoteObject(RemoteRef ref) throws RemoteException {
|
||||
super((UnicastServerRef)ref);
|
||||
}
|
||||
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
public static RemoteStub exportObject(Remote obj) throws RemoteException {
|
||||
UnicastServerRef sref = (UnicastServerRef)((RemoteObject)obj).getRef();
|
||||
return (sref.exportObject(obj));
|
||||
}
|
||||
|
||||
public static Remote exportObject(Remote obj, int port) throws RemoteException {
|
||||
return (exportObject(obj));
|
||||
}
|
||||
|
||||
public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
|
||||
return (exportObject(obj));
|
||||
}
|
||||
|
||||
public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
}
|
34
libjava/java/rmi/server/Unreferenced.java
Normal file
34
libjava/java/rmi/server/Unreferenced.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
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
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA.
|
||||
|
||||
As a special exception, if you link this library with other files to
|
||||
produce an executable, this library does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public License.
|
||||
This exception does not however invalidate any other reasons why the
|
||||
executable file might be covered by the GNU General Public License.
|
||||
*/
|
||||
|
||||
package java.rmi.server;
|
||||
|
||||
public interface Unreferenced {
|
||||
|
||||
public void unreferenced();
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue