You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/05/16 15:52:07 UTC
svn commit: r406944 [11/30] - in
/incubator/harmony/enhanced/classlib/trunk/modules/rmi2: ./ build/ doc/
doc/testing/ doc/testing/rmi http tunneling/ doc/testing/rmi http
tunneling/Results - ITC/ doc/testing/rmi http tunneling/Results - SUN/
doc/testin...
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivateFailedException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivateFailedException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivateFailedException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivateFailedException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,46 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class ActivateFailedException extends RemoteException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4863550261346652506L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivateFailedException(String s) {
+ super(s);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivateFailedException(String s, Exception ex) {
+ super(s, ex);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationDesc.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationDesc.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationDesc.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationDesc.java Tue May 16 06:51:00 2006
@@ -0,0 +1,123 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.io.Serializable;
+import java.rmi.MarshalledObject;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public final class ActivationDesc implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7455834104417690957L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationDesc(String arg0, String className, MarshalledObject data)
+ throws ActivationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationDesc(String arg0, String className, MarshalledObject data,
+ boolean arg3) throws ActivationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationDesc(ActivationGroupID groupID, String className,
+ String location, MarshalledObject data) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationDesc(ActivationGroupID groupID, String className,
+ String location, MarshalledObject data, boolean restart) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationGroupID getGroupID() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean getRestartMode() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public int hashCode() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean equals(Object obj) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String getLocation() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String getClassName() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public MarshalledObject getData() {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,64 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class ActivationException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4320118837291406071L;
+
+ public Throwable detail;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationException() {
+ super();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationException(String s) {
+ super(s);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationException(String s, Throwable cause) {
+ super(s + "; nested exception is:\n\t" + cause.toString());
+ detail = cause;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public Throwable getCause() {
+ return detail.getCause();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup.java Tue May 16 06:51:00 2006
@@ -0,0 +1,109 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public abstract class ActivationGroup extends UnicastRemoteObject implements
+ ActivationInstantiator {
+
+ private static final long serialVersionUID = -7696947875314805420L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ protected ActivationGroup(ActivationGroupID groupID) throws RemoteException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract void activeObject(ActivationID id, Remote obj)
+ throws ActivationException, UnknownObjectException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ protected void activeObject(ActivationID id, MarshalledObject mobj)
+ throws ActivationException, UnknownObjectException, RemoteException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static synchronized ActivationGroupID currentGroupID() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static synchronized ActivationSystem getSystem()
+ throws ActivationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ protected void inactiveGroup() throws UnknownGroupException,
+ RemoteException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean inactiveObject(ActivationID id) throws ActivationException,
+ UnknownObjectException, RemoteException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static synchronized void setSystem(ActivationSystem system)
+ throws ActivationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static synchronized ActivationGroup createGroup(
+ ActivationGroupID arg0, ActivationGroupDesc arg1, long arg2)
+ throws ActivationException {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupDesc.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupDesc.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupDesc.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupDesc.java Tue May 16 06:51:00 2006
@@ -0,0 +1,158 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.io.Serializable;
+import java.rmi.MarshalledObject;
+import java.util.Properties;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public final class ActivationGroupDesc implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4936225423168276595L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static class CommandEnvironment implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6165754737887770191L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public CommandEnvironment(String cmdpath, String[] argv) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String[] getCommandOptions() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String getCommandPath() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public int hashCode() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean equals(Object obj) {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationGroupDesc(Properties overrides, CommandEnvironment cmd) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationGroupDesc(String className, String location,
+ MarshalledObject data, Properties overrides, CommandEnvironment cmd) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public CommandEnvironment getCommandEnvironment() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public Properties getPropertyOverrides() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public int hashCode() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean equals(Object obj) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String getLocation() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String getClassName() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public MarshalledObject getData() {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroupID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,62 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.io.Serializable;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class ActivationGroupID implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1648432278909740833L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationGroupID(ActivationSystem system) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationSystem getSystem() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public int hashCode() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean equals(Object obj) {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup_Stub.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup_Stub.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationGroup_Stub.java Tue May 16 06:51:00 2006
@@ -0,0 +1,52 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.RemoteRef;
+import java.rmi.server.RemoteStub;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public final class ActivationGroup_Stub extends RemoteStub implements
+ ActivationInstantiator, Remote {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationGroup_Stub(RemoteRef ref) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public MarshalledObject newInstance(ActivationID id, ActivationDesc desc)
+ throws RemoteException, ActivationException {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,65 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class ActivationID implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4608673054848209235L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ActivationID(Activator arg0) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public int hashCode() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public boolean equals(Object obj) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public Remote activate(boolean force) throws ActivationException,
+ UnknownObjectException, RemoteException {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationInstantiator.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationInstantiator.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationInstantiator.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationInstantiator.java Tue May 16 06:51:00 2006
@@ -0,0 +1,34 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface ActivationInstantiator extends Remote {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ MarshalledObject newInstance(ActivationID id, ActivationDesc desc)
+ throws ActivationException, RemoteException;
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationMonitor.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationMonitor.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationMonitor.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationMonitor.java Tue May 16 06:51:00 2006
@@ -0,0 +1,48 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface ActivationMonitor extends Remote {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void activeObject(ActivationID id, MarshalledObject obj)
+ throws UnknownObjectException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void inactiveGroup(ActivationGroupID id, long incarnation)
+ throws UnknownGroupException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void inactiveObject(ActivationID id) throws UnknownObjectException,
+ RemoteException;
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationSystem.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationSystem.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationSystem.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/ActivationSystem.java Tue May 16 06:51:00 2006
@@ -0,0 +1,100 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface ActivationSystem extends Remote {
+
+ int SYSTEM_PORT = 1098;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationMonitor activeGroup(ActivationGroupID id,
+ ActivationInstantiator group, long incarnation)
+ throws UnknownGroupException, ActivationException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationDesc getActivationDesc(ActivationID id)
+ throws ActivationException, UnknownObjectException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id)
+ throws ActivationException, UnknownGroupException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationGroupID registerGroup(ActivationGroupDesc desc)
+ throws ActivationException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationID registerObject(ActivationDesc desc)
+ throws ActivationException, UnknownGroupException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc)
+ throws ActivationException, UnknownObjectException,
+ UnknownGroupException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id,
+ ActivationGroupDesc desc) throws ActivationException,
+ UnknownGroupException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void unregisterGroup(ActivationGroupID id) throws ActivationException,
+ UnknownGroupException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void unregisterObject(ActivationID id) throws ActivationException,
+ UnknownObjectException, RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void shutdown() throws RemoteException;
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activator.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activator.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activator.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activator.java Tue May 16 06:51:00 2006
@@ -0,0 +1,35 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface Activator extends Remote {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ MarshalledObject activate(ActivationID id, boolean force)
+ throws ActivationException, UnknownObjectException, RemoteException;
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownGroupException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownGroupException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownGroupException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownGroupException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,37 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class UnknownGroupException extends ActivationException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7056094974750002460L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public UnknownGroupException(String s) {
+ super(s);
+ }
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownObjectException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownObjectException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownObjectException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/UnknownObjectException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,37 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.activation;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class UnknownObjectException extends ActivationException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3425547551622251430L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public UnknownObjectException(String s) {
+ super(s);
+ }
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/DGC.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/DGC.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/DGC.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/DGC.java Tue May 16 06:51:00 2006
@@ -0,0 +1,39 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.dgc;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.ObjID;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface DGC extends Remote {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ */
+ void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong)
+ throws RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ */
+ Lease dirty(ObjID[] ids, long sequenceNum, Lease lease)
+ throws RemoteException;
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/Lease.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/Lease.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/Lease.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/Lease.java Tue May 16 06:51:00 2006
@@ -0,0 +1,64 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.dgc;
+
+import java.io.Serializable;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * @author Gustavo Petri
+ */
+
+public final class Lease implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5713411624328831948L;
+
+ /**
+ * The duation of the <code>Lease</code>.
+ */
+ private long duration;
+
+ /**
+ * The <code>VMID</code> of the <code>Lease</code>.
+ */
+ private VMID id;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ */
+ public Lease(VMID id, long duration) {
+ // Constructor
+ this.duration = duration;
+ this.id = id;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ */
+ public VMID getVMID() {
+ return id;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ */
+ public long getValue() {
+ return duration;
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/VMID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/VMID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/VMID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/dgc/VMID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,106 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.dgc;
+
+import java.io.Serializable;
+import java.rmi.server.UID;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.security.SecureRandom;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public final class VMID implements Serializable {
+
+ private static final long serialVersionUID = -538642295484486218L;
+
+ private UID uid;
+
+ // Address should be unique and constant for the lifetime of this object.
+ private static String address;
+
+ private static boolean isUnique;
+
+ private String instanceAddress;
+
+ // Obtains the localhost address, if not, obtains a random value.
+ static {
+ try {
+ address = InetAddress.getLocalHost().getHostAddress();
+ isUnique = true;
+ } catch (UnknownHostException e) {
+ /*
+ * REVIEW: We are using a Random Long when we cannot get the local
+ * host address.
+ */
+ address = Long.valueOf(new SecureRandom().nextLong()).toString();
+ isUnique = false;
+ }
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ */
+ public VMID() {
+ uid = new UID();
+ instanceAddress = address;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public int hashCode() {
+ return instanceAddress.hashCode() ^ uid.hashCode();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null)
+ return false;
+ if (obj == this)
+ return true;
+ if (!(obj instanceof VMID))
+ return false;
+ return (this.instanceAddress.equals(((VMID) obj).instanceAddress) && this.uid
+ .equals(((VMID) obj).uid));
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public String toString() {
+ return "[VMID: " + uid + ", " + instanceAddress + "]";
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Deprecated
+ public static boolean isUnique() {
+ return isUnique;
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/LocateRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/LocateRegistry.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/LocateRegistry.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/LocateRegistry.java Tue May 16 06:51:00 2006
@@ -0,0 +1,94 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.registry;
+
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+
+import ar.org.fitc.rmi.registry.RegistryImpl;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public final class LocateRegistry {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry createRegistry(int port) throws RemoteException {
+ RegistryImpl registry = new RegistryImpl();
+ registry.exportObject(port, null, null, false);
+ return registry;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry createRegistry(int port, RMIClientSocketFactory csf,
+ RMIServerSocketFactory ssf) throws RemoteException {
+ RegistryImpl registry = new RegistryImpl();
+ registry.exportObject(port, csf, ssf, true);
+ return registry;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry getRegistry() throws RemoteException {
+ return (Registry) RegistryImpl.createStub(Registry.REGISTRY_PORT, null,
+ null, false);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry getRegistry(int port) throws RemoteException {
+ return (Registry) RegistryImpl.createStub(port, null, null, false);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry getRegistry(String host) throws RemoteException {
+ return (Registry) RegistryImpl.createStub(Registry.REGISTRY_PORT, host,
+ null, false);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry getRegistry(String host, int port)
+ throws RemoteException {
+ return (Registry) RegistryImpl.createStub(port, host, null, false);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Registry getRegistry(String host, int port,
+ RMIClientSocketFactory csf) throws RemoteException {
+ return (Registry) RegistryImpl.createStub(port, host, csf, true);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/Registry.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/Registry.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/Registry.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/Registry.java Tue May 16 06:51:00 2006
@@ -0,0 +1,65 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.registry;
+
+import java.rmi.AccessException;
+import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface Registry extends Remote {
+
+ static int REGISTRY_PORT = 1099;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ String[] list() throws RemoteException, AccessException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Remote lookup(String name) throws RemoteException, NotBoundException,
+ AccessException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void bind(String name, Remote obj) throws RemoteException,
+ AlreadyBoundException, AccessException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void rebind(String name, Remote obj) throws RemoteException,
+ AccessException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void unbind(String name) throws RemoteException, NotBoundException,
+ AccessException;
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/RegistryHandler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/RegistryHandler.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/RegistryHandler.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/registry/RegistryHandler.java Tue May 16 06:51:00 2006
@@ -0,0 +1,39 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.registry;
+
+import java.rmi.RemoteException;
+import java.rmi.UnknownHostException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface RegistryHandler {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Registry registryImpl(int port) throws RemoteException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Registry registryStub(String host, int port) throws RemoteException,
+ UnknownHostException;
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ExportException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ExportException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ExportException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ExportException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,46 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class ExportException extends RemoteException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -9155485338494060170L;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ExportException(String s) {
+ super(s);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ExportException(String s, Exception ex) {
+ super(s, ex);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LoaderHandler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LoaderHandler.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LoaderHandler.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LoaderHandler.java Tue May 16 06:51:00 2006
@@ -0,0 +1,49 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface LoaderHandler {
+
+ static final String packagePrefix = "sun.rmi.server";
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Class<?> loadClass(String name) throws MalformedURLException,
+ ClassNotFoundException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Class<?> loadClass(URL codebase, String name) throws MalformedURLException,
+ ClassNotFoundException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Object getSecurityContext(ClassLoader loader);
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LogStream.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LogStream.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LogStream.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/LogStream.java Tue May 16 06:51:00 2006
@@ -0,0 +1,112 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.OutputStream;
+import java.io.PrintStream;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class LogStream extends PrintStream {
+
+ public static final int SILENT = 0;
+
+ public static final int BRIEF = 10;
+
+ public static final int VERBOSE = 20;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public LogStream(OutputStream out) {
+ super(out);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public synchronized void setOutputStream(OutputStream out) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public String toString() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public void write(int b) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public void write(byte[] b, int off, int len) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public synchronized OutputStream getOutputStream() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static synchronized PrintStream getDefaultStream() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static int parseLevel(String s) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static synchronized void setDefaultStream(PrintStream newDefault) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static LogStream log(String name) {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ObjID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ObjID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ObjID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/ObjID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,168 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Serializable;
+import java.security.SecureRandom;
+
+import ar.org.fitc.rmi.utils.PropertiesReader;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public final class ObjID implements Serializable {
+
+ /**
+ * This class defines unique Object Identifiers. It uses an UID and a
+ * counter or a Random generated number to identify between objects within
+ * the same UID.
+ */
+ private static final long serialVersionUID = -6386392263968365220L;
+
+ public static final int REGISTRY_ID = 0;
+
+ public static final int ACTIVATOR_ID = 1;
+
+ public static final int DGC_ID = 2;
+
+ private static long objNumCounter = 0;
+
+ /*
+ * REVIEW: It's assumed that we need the same UID for every object in the
+ * same JVM. This satisfies the specification, though the same UID could be
+ * needed somewhere else, so it may be neccesary to obtain the UID from
+ * somewhere else instead of creating a static one in this class.
+ */
+
+ private static final UID objUIDConst = new UID();
+
+ private static final SecureRandom random = new SecureRandom();
+
+ private static final boolean IsSecureRandom;
+
+ private long objNum;
+
+ private UID objUID;
+
+ /*
+ * The random number generator is set to a default by the SecureRandom()
+ * constructor. The seed is automaticaly set in the first call to
+ * nextLong().
+ */
+ static {
+ String randomIds =
+ PropertiesReader.readString("java.rmi.server.randomIDs");
+ if (randomIds == null) {
+ IsSecureRandom = false;
+ } else {
+ IsSecureRandom = randomIds.equalsIgnoreCase("true");
+ }
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ObjID() {
+
+ if (IsSecureRandom) {
+ this.objNum = random.nextLong();
+ } else {
+ synchronized (ObjID.class) {
+ this.objNum = objNumCounter;
+ objNumCounter++;
+ }
+ this.objUID = objUIDConst;
+ }
+
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public ObjID(int objNum) {
+ this.objNum = objNum;
+ this.objUID = new UID((short) 0);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public int hashCode() {
+
+ /*
+ * REVIEW: This is an arbitrary election for the hash function, that
+ * does not seem to do any harm and it satisfies the specification.
+ */
+ return (int) this.objNum ^ this.objUID.hashCode();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static ObjID read(ObjectInput in) throws IOException {
+ ObjID newObj = new ObjID();
+
+ newObj.objNum = in.readLong();
+ newObj.objUID = UID.read(in);
+
+ return newObj;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public boolean equals(Object obj) {
+
+ if (obj == null)
+ return false;
+ if (obj == this)
+ return true;
+ if (!(obj instanceof ObjID))
+ return false;
+ return (((ObjID) obj).objNum == this.objNum && ((ObjID) obj).objUID
+ .equals(this.objUID));
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Override
+ public String toString() {
+ return "[ObjID:" + this.objNum + ", " + this.objUID.toString() + "]";
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public void write(ObjectOutput out) throws IOException {
+
+ out.writeLong(this.objNum);
+ this.objUID.write(out);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/Operation.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/Operation.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/Operation.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/Operation.java Tue May 16 06:51:00 2006
@@ -0,0 +1,51 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+@Deprecated
+public class Operation {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Deprecated
+ public Operation(String op) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Deprecated
+ public String getOperation() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ @Deprecated
+ public String toString() {
+ throw new UnsupportedOperationException();
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoader.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoader.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoader.java Tue May 16 06:51:00 2006
@@ -0,0 +1,202 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.ClassLoader;
+import java.rmi.server.RMIClassLoaderSpi;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import ar.org.fitc.rmi.runtime.RMIDefaultClassLoaderSpi;
+import ar.org.fitc.rmi.utils.PropertiesReader;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public class RMIClassLoader {
+
+ static private RMIClassLoaderSpi provider = null;
+
+ /*
+ * This initialization is specified in the ClassLoader API, though it is an
+ * awful design.
+ */
+
+ static {
+ String property =
+ PropertiesReader.readString("java.rmi.server.RMIClassLoaderSpi");
+ Class clazz;
+
+ if (property != null) {
+ if (property.equals("default")) {
+ provider = getDefaultProviderInstance();
+ } else {
+ try {
+ clazz = ClassLoader.getSystemClassLoader().loadClass(
+ property);
+ if (RMIClassLoaderSpi.class.isAssignableFrom(clazz)) {
+ provider = (RMIClassLoaderSpi) clazz.newInstance();
+ } else {
+ throw new Error("RMIClassLoader Initialization Failed");
+ }
+ } catch (ClassNotFoundException e) {
+ throw new Error("RMIClassLoader Initialization Failed");
+ } catch (InstantiationException e) {
+ throw new Error("RMIClassLoader Initialization Failed");
+ } catch (IllegalAccessException e) {
+ throw new Error("RMIClassLoader Initialization Failed");
+ }
+ }
+ } else {
+ InputStream in = ClassLoader
+ .getSystemResourceAsStream("META-INF/services/java.rmi.server.RMIClassLoaderSpi");
+ String providerName = null;
+
+ if (in != null) {
+ Scanner scanner = new Scanner(in);
+ Pattern pat = Pattern.compile("\\b[\\w\\.]*\\b",
+ Pattern.COMMENTS);
+ try {
+ while ((in.available() > 0) && provider == null) {
+ if (scanner.hasNext(pat)) {
+ providerName = scanner.next(pat);
+ break;
+ } else if (in.available() > 0) {
+ scanner.nextLine();
+ }
+ }
+ } catch (IOException e) {
+ throw new Error("RMIClassLoader Initialization Failed");
+ }
+ }
+ if (providerName != null) {
+ try {
+ clazz = ClassLoader.getSystemClassLoader().loadClass(
+ providerName);
+ } catch (Exception e) {
+ throw new Error(
+ "RMIClassLoader Initialization Failed from a RMIClassLoaderSpi configuration file");
+ }
+ if (RMIClassLoaderSpi.class.isAssignableFrom(clazz)) {
+ try {
+ provider = (RMIClassLoaderSpi) clazz.newInstance();
+ } catch (Exception e) {
+ throw new Error(
+ "RMIClassLoader Initialization Failed from a RMIClassLoaderSpi configuration file");
+ }
+ } else {
+ throw new Error("RMIClassLoader Initialization Failed");
+ }
+ } else {
+ provider = getDefaultProviderInstance();
+ }
+ }
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static String getClassAnnotation(Class<?> cl)
+ throws NullPointerException {
+
+ return provider.getClassAnnotation(cl);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static ClassLoader getClassLoader(String codebase)
+ throws MalformedURLException, SecurityException {
+
+ return provider.getClassLoader(codebase);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static RMIClassLoaderSpi getDefaultProviderInstance() {
+
+ if (System.getSecurityManager() != null) {
+ System.getSecurityManager().checkPermission(
+ new RuntimePermission("setFactory"));
+ }
+ if (provider == null) {
+ provider = new RMIDefaultClassLoaderSpi();
+ }
+ return provider;
+ }
+
+ @Deprecated
+ public static Object getSecurityContext(@SuppressWarnings("unused") ClassLoader loader) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public static Class<?> loadClass(String name) throws MalformedURLException,
+ ClassNotFoundException {
+ return loadClass((String) null, name);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Class<?> loadClass(String codebase, String name)
+ throws MalformedURLException, ClassNotFoundException {
+ return provider.loadClass(codebase, name, null);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Class<?> loadClass(String codebase, String name,
+ ClassLoader defaultLoader) throws MalformedURLException,
+ ClassNotFoundException {
+
+ return provider.loadClass(codebase, name, defaultLoader);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Class<?> loadClass(URL codebase, String name)
+ throws MalformedURLException, ClassNotFoundException {
+ String codebaseStr = codebase == null ? null : codebase.toString();
+
+ return provider.loadClass(codebaseStr, name, null);
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static Class<?> loadProxyClass(String codebase, String[] interfaces,
+ ClassLoader defaultLoader) throws MalformedURLException,
+ ClassNotFoundException, IllegalArgumentException {
+
+ return provider.loadProxyClass(codebase, interfaces, defaultLoader);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoaderSpi.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoaderSpi.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoaderSpi.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClassLoaderSpi.java Tue May 16 06:51:00 2006
@@ -0,0 +1,63 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.net.MalformedURLException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public abstract class RMIClassLoaderSpi {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public RMIClassLoaderSpi() {
+ // Constructor
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract Class<?> loadProxyClass(String codebase,
+ String[] interfaces, ClassLoader defaultLoader)
+ throws MalformedURLException, ClassNotFoundException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract String getClassAnnotation(Class cl);
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract Class<?> loadClass(String codebase, String name,
+ ClassLoader defaultLoader) throws MalformedURLException,
+ ClassNotFoundException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract ClassLoader getClassLoader(String codebase)
+ throws MalformedURLException;
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClientSocketFactory.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClientSocketFactory.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClientSocketFactory.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIClientSocketFactory.java Tue May 16 06:51:00 2006
@@ -0,0 +1,33 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.IOException;
+import java.net.Socket;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface RMIClientSocketFactory {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ Socket createSocket(String host, int port) throws IOException;
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIFailureHandler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIFailureHandler.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIFailureHandler.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIFailureHandler.java Tue May 16 06:51:00 2006
@@ -0,0 +1,30 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface RMIFailureHandler {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ boolean failure(Exception ex);
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIServerSocketFactory.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIServerSocketFactory.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIServerSocketFactory.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMIServerSocketFactory.java Tue May 16 06:51:00 2006
@@ -0,0 +1,33 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface RMIServerSocketFactory {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ServerSocket createServerSocket(int port) throws IOException;
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMISocketFactory.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMISocketFactory.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMISocketFactory.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RMISocketFactory.java Tue May 16 06:51:00 2006
@@ -0,0 +1,115 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import ar.org.fitc.rmi.transport.RMIDefaultSocketFactory;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public abstract class RMISocketFactory implements RMIClientSocketFactory,
+ RMIServerSocketFactory {
+
+ private static RMIFailureHandler failureHandler;
+
+ private static RMISocketFactory socketFactory;
+
+ private static RMISocketFactory defaultSocketFactory;
+
+ static {
+ defaultSocketFactory = new RMIDefaultSocketFactory();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public RMISocketFactory() {
+ super();
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract Socket createSocket(String host, int port)
+ throws IOException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public abstract ServerSocket createServerSocket(int port)
+ throws IOException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static RMISocketFactory getDefaultSocketFactory() {
+ return defaultSocketFactory;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static RMIFailureHandler getFailureHandler() {
+ return failureHandler;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static RMISocketFactory getSocketFactory() {
+ return socketFactory;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static void setFailureHandler(RMIFailureHandler fh) {
+ SecurityManager security = System.getSecurityManager();
+ if (security != null) {
+ security.checkSetFactory();
+ }
+ failureHandler = fh;
+ }
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ public static void setSocketFactory(RMISocketFactory fac)
+ throws IOException {
+ SecurityManager security = System.getSecurityManager();
+ if (security != null) {
+ security.checkSetFactory();
+ }
+ if (socketFactory == null) {
+ socketFactory = fac;
+ } else {
+ throw new IOException("RMI Socket Factory already set");
+ }
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RemoteCall.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RemoteCall.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RemoteCall.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/server/RemoteCall.java Tue May 16 06:51:00 2006
@@ -0,0 +1,71 @@
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package java.rmi.server;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.StreamCorruptedException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+public interface RemoteCall {
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ObjectOutput getResultStream(boolean success) throws IOException,
+ StreamCorruptedException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void releaseInputStream() throws IOException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void releaseOutputStream() throws IOException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void executeCall() throws Exception;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ObjectInput getInputStream() throws IOException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ ObjectOutput getOutputStream() throws IOException;
+
+ /**
+ * @ar.org.fitc.spec_ref
+ *
+ */
+ void done() throws IOException;
+}