You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2006/10/06 12:15:55 UTC
svn commit: r453541 [3/6] - in
/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java:
java/rmi/ java/rmi/activation/ java/rmi/dgc/ java/rmi/registry/
java/rmi/server/ org/apache/harmony/rmi/ org/apache/harmony/rmi/activation/
org/apache/...
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid_Stub.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid_Stub.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid_Stub.java Fri Oct 6 03:15:51 2006
@@ -10,6 +10,8 @@
*/
package org.apache.harmony.rmi.activation;
+import org.apache.harmony.rmi.internal.nls.Messages;
+
public final class Rmid_Stub extends java.rmi.server.RemoteStub
implements java.rmi.activation.ActivationSystem, java.rmi.activation.ActivationMonitor, java.rmi.activation.Activator, java.rmi.Remote {
@@ -21,20 +23,20 @@
private static boolean useNewInvoke;
private static final java.rmi.server.Operation[] operations = {
- new java.rmi.server.Operation("java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID, boolean)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationInstantiator, long)"),
- new java.rmi.server.Operation("void activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID)"),
- new java.rmi.server.Operation("void inactiveGroup(java.rmi.activation.ActivationGroupID, long)"),
- new java.rmi.server.Operation("void inactiveObject(java.rmi.activation.ActivationID)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)"),
- new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)"),
- new java.rmi.server.Operation("void shutdown()"),
- new java.rmi.server.Operation("void unregisterGroup(java.rmi.activation.ActivationGroupID)"),
- new java.rmi.server.Operation("void unregisterObject(java.rmi.activation.ActivationID)")
+ new java.rmi.server.Operation("java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID, boolean)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationInstantiator, long)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("void activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("void inactiveGroup(java.rmi.activation.ActivationGroupID, long)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("void inactiveObject(java.rmi.activation.ActivationID)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("void shutdown()"), //$NON-NLS-1$
+ new java.rmi.server.Operation("void unregisterGroup(java.rmi.activation.ActivationGroupID)"), //$NON-NLS-1$
+ new java.rmi.server.Operation("void unregisterObject(java.rmi.activation.ActivationID)") //$NON-NLS-1$
};
private static java.lang.reflect.Method $method_activate_0;
@@ -54,22 +56,22 @@
static {
try {
- java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] {java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class});
+ java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] {java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class}); //$NON-NLS-1$
- $method_activate_0 = java.rmi.activation.Activator.class.getMethod("activate", new java.lang.Class[] {java.rmi.activation.ActivationID.class, boolean.class});
- $method_activeGroup_1 = java.rmi.activation.ActivationSystem.class.getMethod("activeGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationInstantiator.class, long.class});
- $method_activeObject_2 = java.rmi.activation.ActivationMonitor.class.getMethod("activeObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class, java.rmi.MarshalledObject.class});
- $method_getActivationDesc_3 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationDesc", new java.lang.Class[] {java.rmi.activation.ActivationID.class});
- $method_getActivationGroupDesc_4 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationGroupDesc", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class});
- $method_inactiveGroup_5 = java.rmi.activation.ActivationMonitor.class.getMethod("inactiveGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, long.class});
- $method_inactiveObject_6 = java.rmi.activation.ActivationMonitor.class.getMethod("inactiveObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class});
- $method_registerGroup_7 = java.rmi.activation.ActivationSystem.class.getMethod("registerGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupDesc.class});
- $method_registerObject_8 = java.rmi.activation.ActivationSystem.class.getMethod("registerObject", new java.lang.Class[] {java.rmi.activation.ActivationDesc.class});
- $method_setActivationDesc_9 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationDesc", new java.lang.Class[] {java.rmi.activation.ActivationID.class, java.rmi.activation.ActivationDesc.class});
- $method_setActivationGroupDesc_10 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationGroupDesc", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationGroupDesc.class});
- $method_shutdown_11 = java.rmi.activation.ActivationSystem.class.getMethod("shutdown", new java.lang.Class[] {});
- $method_unregisterGroup_12 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class});
- $method_unregisterObject_13 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class});
+ $method_activate_0 = java.rmi.activation.Activator.class.getMethod("activate", new java.lang.Class[] {java.rmi.activation.ActivationID.class, boolean.class}); //$NON-NLS-1$
+ $method_activeGroup_1 = java.rmi.activation.ActivationSystem.class.getMethod("activeGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationInstantiator.class, long.class}); //$NON-NLS-1$
+ $method_activeObject_2 = java.rmi.activation.ActivationMonitor.class.getMethod("activeObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class, java.rmi.MarshalledObject.class}); //$NON-NLS-1$
+ $method_getActivationDesc_3 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationDesc", new java.lang.Class[] {java.rmi.activation.ActivationID.class}); //$NON-NLS-1$
+ $method_getActivationGroupDesc_4 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationGroupDesc", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class}); //$NON-NLS-1$
+ $method_inactiveGroup_5 = java.rmi.activation.ActivationMonitor.class.getMethod("inactiveGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, long.class}); //$NON-NLS-1$
+ $method_inactiveObject_6 = java.rmi.activation.ActivationMonitor.class.getMethod("inactiveObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class}); //$NON-NLS-1$
+ $method_registerGroup_7 = java.rmi.activation.ActivationSystem.class.getMethod("registerGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupDesc.class}); //$NON-NLS-1$
+ $method_registerObject_8 = java.rmi.activation.ActivationSystem.class.getMethod("registerObject", new java.lang.Class[] {java.rmi.activation.ActivationDesc.class}); //$NON-NLS-1$
+ $method_setActivationDesc_9 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationDesc", new java.lang.Class[] {java.rmi.activation.ActivationID.class, java.rmi.activation.ActivationDesc.class}); //$NON-NLS-1$
+ $method_setActivationGroupDesc_10 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationGroupDesc", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationGroupDesc.class}); //$NON-NLS-1$
+ $method_shutdown_11 = java.rmi.activation.ActivationSystem.class.getMethod("shutdown", new java.lang.Class[] {}); //$NON-NLS-1$
+ $method_unregisterGroup_12 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class}); //$NON-NLS-1$
+ $method_unregisterObject_13 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class}); //$NON-NLS-1$
useNewInvoke = true;
} catch (java.lang.NoSuchMethodException e) {
@@ -100,7 +102,8 @@
out.writeObject($param_ActivationID_1);
out.writeBoolean($param_boolean_2);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -111,9 +114,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.MarshalledObject) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -127,7 +132,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -147,7 +153,7 @@
out.writeObject($param_ActivationInstantiator_2);
out.writeLong($param_long_3);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -158,9 +164,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationMonitor) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -174,7 +182,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -192,7 +201,8 @@
out.writeObject($param_ActivationID_1);
out.writeObject($param_MarshalledObject_2);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -206,7 +216,8 @@
} catch (java.rmi.activation.UnknownObjectException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -224,7 +235,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationID_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -235,9 +247,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationDesc) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -251,7 +265,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -269,7 +284,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationGroupID_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -280,9 +296,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationGroupDesc) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -296,7 +314,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -314,7 +333,8 @@
out.writeObject($param_ActivationGroupID_1);
out.writeLong($param_long_2);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -328,7 +348,8 @@
} catch (java.rmi.activation.UnknownGroupException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -345,7 +366,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationID_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -359,7 +381,8 @@
} catch (java.rmi.activation.UnknownObjectException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -377,7 +400,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationGroupDesc_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -388,9 +412,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationGroupID) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -404,7 +430,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -422,7 +449,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationDesc_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -433,9 +461,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationID) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ //rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -449,7 +479,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -468,7 +499,8 @@
out.writeObject($param_ActivationID_1);
out.writeObject($param_ActivationDesc_2);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -479,9 +511,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationDesc) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -495,7 +529,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -514,7 +549,8 @@
out.writeObject($param_ActivationGroupID_1);
out.writeObject($param_ActivationGroupDesc_2);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -525,9 +561,11 @@
java.io.ObjectInput in = call.getInputStream();
$result = (java.rmi.activation.ActivationGroupDesc) in.readObject();
} catch (java.io.IOException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} catch (java.lang.ClassNotFoundException e) {
- throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+ // rmi.27=Error unmarshalling return value
+ throw new java.rmi.UnmarshalException(Messages.getString("rmi.27"), e); //$NON-NLS-1$
} finally {
ref.done(call);
}
@@ -541,7 +579,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -563,7 +602,8 @@
} catch (java.rmi.RemoteException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -580,7 +620,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationGroupID_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -594,7 +635,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
@@ -611,7 +653,8 @@
java.io.ObjectOutput out = call.getOutputStream();
out.writeObject($param_ActivationID_1);
} catch (java.io.IOException e) {
- throw new java.rmi.MarshalException("Error marshalling arguments", e);
+ // rmi.26=Error marshalling arguments
+ throw new java.rmi.MarshalException(Messages.getString("rmi.26"), e); //$NON-NLS-1$
}
ref.invoke(call);
@@ -625,7 +668,8 @@
} catch (java.rmi.activation.ActivationException e) {
throw e;
} catch (java.lang.Exception e) {
- throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ // rmi.0C=Undeclared checked exception
+ throw new java.rmi.UnexpectedException(Messages.getString("rmi.0C"), e); //$NON-NLS-1$
}
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnection.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnection.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnection.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnection.java Fri Oct 6 03:15:51 2006
@@ -36,6 +36,7 @@
import org.apache.harmony.rmi.common.RMILog;
import org.apache.harmony.rmi.common.RMIUtil;
+import org.apache.harmony.rmi.internal.nls.Messages;
import org.apache.harmony.rmi.transport.Endpoint;
import org.apache.harmony.rmi.transport.RMIProtocolConstants;
@@ -85,8 +86,8 @@
out = new BufferedOutputStream(s.getOutputStream());
in = new BufferedInputStream(s.getInputStream());
} catch (IOException ioe) {
- throw new ConnectException(
- "Unable to establish connection to server", ioe);
+ // rmi.40=Unable to establish connection to server
+ throw new ConnectException(Messages.getString("rmi.40"), ioe); //$NON-NLS-1$
}
serverProtocolAck();
}
@@ -114,7 +115,8 @@
}
if (dgcLog.isLoggable(RMILog.VERBOSE)) {
- dgcLog.log(RMILog.VERBOSE, "Sent DGC ack to " + ep + " for " + uid);
+ // rmi.log.93=Sent DGC ack to {0} for {1}
+ dgcLog.log(RMILog.VERBOSE, Messages.getString("rmi.log.93", ep, uid)); //$NON-NLS-1$
}
}
@@ -141,13 +143,14 @@
dout.writeInt(RMI_HEADER);
dout.writeShort(PROTOCOL_VER);
} catch (IOException ioe) {
- throw new ConnectIOException(
- "Unable to write RMI protocol header", ioe);
+ // rmi.41=Unable to write RMI protocol header
+ throw new ConnectIOException(Messages.getString("rmi.41"), ioe); //$NON-NLS-1$
}
if (transportLog.isLoggable(RMILog.VERBOSE)) {
- transportLog.log(RMILog.VERBOSE, "Using protocol version "
- + PROTOCOL_VER);
+ // rmi.log.94=Using protocol version {0}
+ transportLog.log(RMILog.VERBOSE, Messages.getString("rmi.log.94", //$NON-NLS-1$
+ PROTOCOL_VER));
}
}
@@ -256,6 +259,6 @@
* @return string representation of this connection
*/
public String toString() {
- return RMIUtil.getShortName(getClass()) + ": endpoint:" + ep;
+ return RMIUtil.getShortName(getClass()) + ": endpoint:" + ep; //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnectionManager.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnectionManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientConnectionManager.java Fri Oct 6 03:15:51 2006
@@ -36,6 +36,7 @@
import org.apache.harmony.rmi.common.GetLongPropAction;
import org.apache.harmony.rmi.common.RMILog;
import org.apache.harmony.rmi.common.RMIProperties;
+import org.apache.harmony.rmi.internal.nls.Messages;
import org.apache.harmony.rmi.transport.Endpoint;
import org.apache.harmony.rmi.transport.proxy.HttpConnection;
import org.apache.harmony.rmi.transport.proxy.HttpOutboundSocket;
@@ -70,7 +71,7 @@
static {
ConnectionsCollector coll = new ConnectionsCollector();
((Thread) AccessController.doPrivileged(new CreateThreadAction(
- coll, "ConnectionsCollector", true))).start();
+ coll, "ConnectionsCollector", true))).start(); //$NON-NLS-1$
}
/**
@@ -185,9 +186,9 @@
if (tcpTransportLog.isLoggable(
RMILog.VERBOSE)) {
+ // rmi.log.37={0} connection timeout is expired
tcpTransportLog.log(RMILog.VERBOSE,
- conn.toString()
- + " connection timeout is expired");
+ Messages.getString("rmi.log.37", conn.toString())); //$NON-NLS-1$
}
continue;
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientRemoteCall.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientRemoteCall.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientRemoteCall.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/client/ClientRemoteCall.java Fri Oct 6 03:15:51 2006
@@ -35,6 +35,7 @@
import java.rmi.server.UID;
import org.apache.harmony.rmi.common.RMILog;
+import org.apache.harmony.rmi.internal.nls.Messages;
import org.apache.harmony.rmi.remoteref.UnicastRef;
import org.apache.harmony.rmi.transport.RMIObjectInputStream;
import org.apache.harmony.rmi.transport.RMIObjectOutputStream;
@@ -156,7 +157,8 @@
*/
public void executeCall() throws Exception {
if (isClosed) {
- throw new RemoteException("Remote call is already closed.");
+ // rmi.38=Remote call is already closed.
+ throw new RemoteException(Messages.getString("rmi.38")); //$NON-NLS-1$
}
byte data;
@@ -164,8 +166,8 @@
// read input
if ((data = (new DataInputStream(conn.getInputStream())).readByte())
!= CALL_OK) {
- throw new UnmarshalException(
- "Unknown call status response: " + data);
+ // rmi.39=Unknown call status response: {0}
+ throw new UnmarshalException(Messages.getString("rmi.39", data)); //$NON-NLS-1$
}
// read return value id
@@ -174,13 +176,14 @@
} catch (UnmarshalException re) {
throw re;
} catch (IOException ioe) {
- throw new UnmarshalException("Unable to read call return header: ",
+ // rmi.3A=Unable to read call return header:
+ throw new UnmarshalException(Messages.getString("rmi.3A"), //$NON-NLS-1$
ioe);
}
if (data != RETURN_VAL && data != RETURN_EX) {
- throw new UnmarshalException(
- "Unknown call result response: " + data);
+ // rmi.3B=Unknown call result response: {0}
+ throw new UnmarshalException(Messages.getString("rmi.3B", data)); //$NON-NLS-1$
}
uid = UID.read(oin);
@@ -205,7 +208,7 @@
* @return string representation of this RemoteCall
*/
public String toString() {
- return "ClientRemoteCall: " + conn;
+ return "ClientRemoteCall: " + conn; //$NON-NLS-1$
}
/*
@@ -220,11 +223,12 @@
try {
obj = oin.readObject();
} catch (IOException ioe) {
- throw new UnmarshalException("IOException occured while "
- + "unmarshalling returned exception", ioe);
+ // rmi.3C=IOException occured while unmarshalling returned exception
+ throw new UnmarshalException(Messages.getString("rmi.3C"), ioe); //$NON-NLS-1$
+
} catch (ClassNotFoundException cnfe) {
- throw new UnmarshalException("ClassNotFoundException occured "
- + "while unmarshalling returned exception", cnfe);
+ // rmi.3D=ClassNotFoundException occured while unmarshalling returned exception
+ throw new UnmarshalException(Messages.getString("rmi.3D"), cnfe); //$NON-NLS-1$
}
if (obj instanceof Exception) {
@@ -242,8 +246,8 @@
}
if (!ok) {
- resEx = new UnexpectedException(
- "Remote method threw unexpected exception", resEx);
+ // rmi.3E=Remote method threw unexpected exception
+ resEx = new UnexpectedException(Messages.getString("rmi.3E"), resEx); //$NON-NLS-1$
}
}
@@ -259,12 +263,12 @@
// logs exception from server
if (UnicastRef.clientCallsLog.isLoggable(RMILog.BRIEF)) {
UnicastRef.clientCallsLog.log(RMILog.BRIEF,
- "Outbound remote call to " + conn +
- " received exception: ", resEx);
+ Messages.getString("rmi.log.92", conn), resEx); //$NON-NLS-1$
}
throw resEx;
} else {
- throw new UnexpectedException("Not Exception type thrown: " + obj);
+ // rmi.3F=Not Exception type thrown: {0}
+ throw new UnexpectedException(Messages.getString("rmi.3F", obj)); //$NON-NLS-1$
}
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/CreateThreadAction.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/CreateThreadAction.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/CreateThreadAction.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/CreateThreadAction.java Fri Oct 6 03:15:51 2006
@@ -75,7 +75,7 @@
private static final ThreadGroup nonSystemGroup = (ThreadGroup)
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
- return new ThreadGroup(systemGroup, "RMI Group");
+ return new ThreadGroup(systemGroup, "RMI Group"); //$NON-NLS-1$
}
});
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/EclipseJavaCompiler.java Fri Oct 6 03:15:51 2006
@@ -38,12 +38,12 @@
* Eclipse Compiler class name.
*/
public static final String ECLIPSE_COMPILER_CLASS_NAME =
- "org.eclipse.jdt.internal.compiler.batch.Main";
+ "org.eclipse.jdt.internal.compiler.batch.Main"; //$NON-NLS-1$
/**
* Eclipse Compiler method name.
*/
- protected final static String ECLIPSE_COMPILER_METHOD_NAME = "compile";
+ protected final static String ECLIPSE_COMPILER_METHOD_NAME = "compile"; //$NON-NLS-1$
/**
* Eclipse Compiler method signature.
@@ -54,19 +54,19 @@
/**
* Name of the environment variable specifying the Eclipse location.
*/
- public static final String ECLIPSE_HOME_VARIABLE = "ECLIPSE_HOME";
+ public static final String ECLIPSE_HOME_VARIABLE = "ECLIPSE_HOME"; //$NON-NLS-1$
/**
* Path from {@link #ECLIPSE_HOME_VARIABLE ECLIPSE_HOME}
* to {@linkplain #ECLIPSE_JAR_PATTERN Eclipse Compiler JAR}.
*/
- public static final String ECLIPSE_JAR_PATH = "plugins";
+ public static final String ECLIPSE_JAR_PATH = "plugins"; //$NON-NLS-1$
/**
* File name pattern describing Eclipse Compiler JAR file name.
*/
public static final String ECLIPSE_JAR_PATTERN =
- "^org.eclipse.jdt.core_.+\\.jar$";
+ "^org.eclipse.jdt.core_.+\\.jar$"; //$NON-NLS-1$
/**
* Creates instance of this class, equivalent to
@@ -114,7 +114,7 @@
getClassLoaderFromJarFile(
getFileFromVariable(ECLIPSE_HOME_VARIABLE,
ECLIPSE_JAR_PATH, ECLIPSE_JAR_PATTERN,
- "Eclipse Compiler JAR")));
+ "Eclipse Compiler JAR"))); //$NON-NLS-1$
}
compilerMethod = getMethod(compilerClass, ECLIPSE_COMPILER_METHOD_NAME,
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/ExecJavaCompiler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/ExecJavaCompiler.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/ExecJavaCompiler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/ExecJavaCompiler.java Fri Oct 6 03:15:51 2006
@@ -36,24 +36,24 @@
/**
* Default name of a program to execute.
*/
- public static final String DEFAULT_COMPILER_PROGRAM = "javac";
+ public static final String DEFAULT_COMPILER_PROGRAM = "javac"; //$NON-NLS-1$
/**
* Name of the system variable specifying the Java location.
*/
- public static final String JAVA_HOME_VARIABLE = "JAVA_HOME";
+ public static final String JAVA_HOME_VARIABLE = "JAVA_HOME"; //$NON-NLS-1$
/**
* Path from {@link #JAVA_HOME_VARIABLE JAVA_HOME}
* to {@linkplain #JAVA_COMPILER_PATTERN Javac executable}.
*/
- public static final String JAVA_COMPILER_PATH = "bin";
+ public static final String JAVA_COMPILER_PATH = "bin"; //$NON-NLS-1$
/**
* File name pattern describing Javac executable file name.
*/
public static final String JAVA_COMPILER_PATTERN =
- "((javac)|(JAVAC))(|(\\.(exe|EXE)))";
+ "((javac)|(JAVAC))(|(\\.(exe|EXE)))"; //$NON-NLS-1$
/**
* Creates uninitialized instance of this class.
@@ -100,7 +100,7 @@
public ExecJavaCompiler(String programName) throws JavaCompilerException {
compilerOptions = new String[] { (programName == null)
? getFileFromVariable(JAVA_HOME_VARIABLE, JAVA_COMPILER_PATH,
- JAVA_COMPILER_PATTERN, "Java compiler").getPath()
+ JAVA_COMPILER_PATTERN, "Java compiler").getPath() //$NON-NLS-1$
: programName };
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/JavaCompiler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/JavaCompiler.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/JavaCompiler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/JavaCompiler.java Fri Oct 6 03:15:51 2006
@@ -25,6 +25,8 @@
import java.io.File;
import java.io.FilenameFilter;
+import org.apache.harmony.rmi.internal.nls.Messages;
+
/**
* Representation of a Java Compiler.
@@ -53,7 +55,7 @@
*/
public int compile(String commandLine) throws JavaCompilerException {
return compile((commandLine != null)
- ? commandLine.trim().split("\\s") : new String[0]);
+ ? commandLine.trim().split("\\s") : new String[0]); //$NON-NLS-1$
}
/**
@@ -200,8 +202,8 @@
}
if (parent == null) {
- throw new JavaCompilerException(
- variableName + " variable not found");
+ // rmi.4C={0} variable not found
+ throw new JavaCompilerException(Messages.getString("rmi.4C", variableName)); //$NON-NLS-1$
}
File[] files = new File(parent, path).listFiles(
@@ -213,7 +215,8 @@
});
if ((files == null) || (files.length < 1)) {
- throw new JavaCompilerException(name + " not found");
+ // rmi.4D={0} not found
+ throw new JavaCompilerException(Messages.getString("rmi.4D", name)); //$NON-NLS-1$
}
return files[0];
}
@@ -278,9 +281,10 @@
System.getProperty(JAVA_COMPILER_METHOD_PROPERTY);
if (verbose) {
- System.err.println("NOTE: Using compiler class: " +
+ // rmi.console.08=NOTE: Using compiler class:
+ System.err.println(Messages.getString("rmi.console.08") + //$NON-NLS-1$
compilerClassName + ((compilerMethodName != null)
- ? (", method: " + compilerMethodName) : ""));
+ ? (", method: " + compilerMethodName) : "")); //$NON-NLS-1$ //$NON-NLS-2$
}
return new MethodJavaCompiler(
compilerClassName, compilerMethodName);
@@ -292,8 +296,9 @@
if (executableName != null) {
if (verbose) {
- System.err.println("NOTE: Using compiler executable: " +
- executableName);
+ // rmi.console.09=NOTE: Using compiler executable: {0}
+ System.err.println(Messages.getString("rmi.console.09", //$NON-NLS-1$
+ executableName));
}
return new ExecJavaCompiler(executableName);
}
@@ -303,13 +308,14 @@
JavaCompiler compiler = new EclipseJavaCompiler();
if (verbose) {
- System.err.println("NOTE: Using Eclipse Compiler");
+ // rmi.console.0A=NOTE: Using Eclipse Compiler
+ System.err.println(Messages.getString("rmi.console.0A")); //$NON-NLS-1$
}
return compiler;
} catch (JavaCompilerException e) {
if (verbose) {
- System.err.println(
- "NOTE: Eclipse Compiler class not found: " + e);
+ // rmi.console.0B=NOTE: Eclipse Compiler class not found: {0}
+ System.err.println(Messages.getString("rmi.console.0B", e)); //$NON-NLS-1$
}
}
@@ -318,13 +324,14 @@
JavaCompiler compiler = new ExecJavaCompiler(true);
if (verbose) {
- System.err.println("NOTE: Using JAVA_HOME Javac compiler");
+ // rmi.console.0C=NOTE: Using JAVA_HOME Javac compiler
+ System.err.println(Messages.getString("rmi.console.0C")); //$NON-NLS-1$
}
return compiler;
} catch (JavaCompilerException e) {
if (verbose) {
- System.err.println(
- "NOTE: JAVA_HOME Javac compiler not found: " + e);
+ // rmi.console.0D=NOTE: JAVA_HOME Javac compiler not found: {0}
+ System.err.println(Messages.getString("rmi.console.0D", e)); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/MethodJavaCompiler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/MethodJavaCompiler.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/MethodJavaCompiler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/MethodJavaCompiler.java Fri Oct 6 03:15:51 2006
@@ -46,7 +46,7 @@
/**
* Default name of a method to call in a compiler class.
*/
- public static final String DEFAULT_COMPILER_METHOD = "main";
+ public static final String DEFAULT_COMPILER_METHOD = "main"; //$NON-NLS-1$
/**
* Compiler method signature.
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIConstants.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIConstants.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIConstants.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIConstants.java Fri Oct 6 03:15:51 2006
@@ -22,6 +22,8 @@
*/
package org.apache.harmony.rmi.common;
+import org.apache.harmony.rmi.internal.nls.Messages;
+
/**
* The constants of the RMI and Activation framework.
@@ -49,17 +51,17 @@
/**
* The default filename to store snapshots of the RMID's state.
*/
- public static final String DEFAULT_SNAPSHOT_FILE = "snapshot.rmid";
+ public static final String DEFAULT_SNAPSHOT_FILE = "snapshot.rmid"; //$NON-NLS-1$
/**
* The default filename to store deltas of the RMID's state between snapshots.
*/
- public static final String DEFAULT_DELTA_FILE = "delta.rmid";
+ public static final String DEFAULT_DELTA_FILE = "delta.rmid"; //$NON-NLS-1$
/**
* The default folder to store rmid log (snapshot and delta).
*/
- public static final String DEFAULT_LOG_FOLDER = "log";
+ public static final String DEFAULT_LOG_FOLDER = "log"; //$NON-NLS-1$
/**
* "Well-Known" ObjID for Activation System.
*/
@@ -67,18 +69,29 @@
/**
* The usage of RMID tool.
+ *
+ * rmi.console.0E=\nUsage: rmid <options>
+ * rmi.console.0F=\n\nwhere <options> include:
+ * rmi.console.10=\n-port <port> Specify port for rmid to use
+ * rmi.console.11=\n-log <directory> Specify directory in which rmid writes log
+ * rmi.console.12=\n-stop Stop current invocation of rmid (for specified port)
+ * rmi.console.13=\n-C<runtime flag> Pass argument to each child process (activation group)
+ * rmi.console.14=\n-J<runtime flag> Pass argument to the java interpreter
+ * rmi.console.15=\n-help Prints this help message
+ * rmi.console.16=\n------------------ Nonstandard options ------------------
+ * rmi.console.17=\n-monitor Starts rmid with monitoring on
*/
public static final String RMID_USAGE =
- "\nUsage: rmid <options>"+
- "\n\nwhere <options> include:"+
- "\n-port <port> Specify port for rmid to use"+
- "\n-log <directory> Specify directory in which rmid writes log"+
- "\n-stop Stop current invocation of rmid (for specified port)"+
- "\n-C<runtime flag> Pass argument to each child process (activation group)"+
- "\n-J<runtime flag> Pass argument to the java interpreter"+
- "\n-help Prints this help message"+
- "\n------------------ Nonstandard options ------------------"+
- "\n-monitor Starts rmid with monitoring on";
+ Messages.getString("rmi.console.0E")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.0F")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.10")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.11")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.12")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.13")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.14")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.15")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.16")+ //$NON-NLS-1$
+ Messages.getString("rmi.console.17"); //$NON-NLS-1$
/**
* The default timeout that is given to the ActivationGroup VM to
@@ -106,12 +119,12 @@
* @see org.apache.harmony.rmi.activation.RmidMonitorAdapter
*/
public static final String DEFAULT_ACTIVATION_MONITOR_CLASS_NAME =
- "org.apache.harmony.rmi.activation.RmidMonitorAdapter";
+ "org.apache.harmony.rmi.activation.RmidMonitorAdapter"; //$NON-NLS-1$
/**
* The default value of the activation group VM executable.
*
* @see RMIProperties#ACTIVATION_VM_EXECUTABLE_PROP
*/
- public static final String DEFAULT_ACTIVATION_VM_EXECUTABLE = "java";
+ public static final String DEFAULT_ACTIVATION_VM_EXECUTABLE = "java"; //$NON-NLS-1$
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIHash.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIHash.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIHash.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIHash.java Fri Oct 6 03:15:51 2006
@@ -36,6 +36,8 @@
import java.util.TreeMap;
import java.util.TreeSet;
+import org.apache.harmony.rmi.internal.nls.Messages;
+
/**
* Generates class and method hash codes neccessary for RMI.
@@ -72,11 +74,13 @@
return getHash(buffer.toByteArray());
} catch (IOException e) {
- throw new RMIHashException("Failed to calculate hash for method "
- + method, e);
+ // rmi.42=Failed to calculate hash for method {0}
+ throw new RMIHashException(Messages.getString("rmi.42", //$NON-NLS-1$
+ method), e);
} catch (NoSuchAlgorithmException e) {
- throw new RMIHashException("Failed to calculate hash for method "
- + method, e);
+ // rmi.42=Failed to calculate hash for method {0}
+ throw new RMIHashException(Messages.getString("rmi.42", //$NON-NLS-1$
+ method), e);
}
}
@@ -96,8 +100,9 @@
try {
return getInterfaceHash(getSortedMethodMap(cls.getMethods()));
} catch (RMIHashException e) {
- throw new RMIHashException("Failed to calculate interface hash "
- + "for class" + cls, e.getCause());
+ // rmi.43=Failed to calculate interface hash for class {0}
+ throw new RMIHashException(Messages.getString("rmi.43", //$NON-NLS-1$
+ cls), e.getCause());
}
}
@@ -143,11 +148,11 @@
return getHash(buffer.toByteArray());
} catch (IOException e) {
- throw new RMIHashException("Failed to calculate interface hash "
- + "for specified set of methods", e);
+ // rmi.44=Failed to calculate interface hash for specified set of methods
+ throw new RMIHashException(Messages.getString("rmi.44"), e); //$NON-NLS-1$
} catch (NoSuchAlgorithmException e) {
- throw new RMIHashException("Failed to calculate interface hash "
- + "for specified set of methods", e);
+ // rmi.44=Failed to calculate interface hash for specified set of methods
+ throw new RMIHashException(Messages.getString("rmi.44"), e); //$NON-NLS-1$
}
}
@@ -203,7 +208,7 @@
* Should never occur.
*/
private static long getHash(byte[] buffer) throws NoSuchAlgorithmException {
- byte[] digest = MessageDigest.getInstance("SHA-1").digest(buffer);
+ byte[] digest = MessageDigest.getInstance("SHA-1").digest(buffer); //$NON-NLS-1$
long hash = 0;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMILog.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMILog.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMILog.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMILog.java Fri Oct 6 03:15:51 2006
@@ -81,7 +81,7 @@
* @return RMILog for logging remote calls on server side
*/
public static RMILog getServerCallsLog() {
- return getLog("harmony.rmi.server.call",
+ return getLog("harmony.rmi.server.call", //$NON-NLS-1$
getBoolean(LOGSERVER_PROP) ? VERBOSE : SILENT);
}
@@ -93,7 +93,7 @@
* @return RMILog for logging remote calls on client side
*/
public static RMILog getClientCallsLog() {
- return getLog("harmony.rmi.client.call",
+ return getLog("harmony.rmi.client.call", //$NON-NLS-1$
getBoolean(LOGCLIENT_PROP) ? VERBOSE : SILENT);
}
@@ -105,7 +105,7 @@
* @return RMILog for logging remote reference activity on server side
*/
public static RMILog getServerRefLog() {
- return getLog("harmony.rmi.server.ref", getString(SERVERLOGLEVEL_PROP));
+ return getLog("harmony.rmi.server.ref", getString(SERVERLOGLEVEL_PROP)); //$NON-NLS-1$
}
/**
@@ -116,7 +116,7 @@
* @return RMILog for logging remote reference activity on client side
*/
public static RMILog getClientRefLog() {
- return getLog("harmony.rmi.client.ref", getString(CLIENTLOGLEVEL_PROP));
+ return getLog("harmony.rmi.client.ref", getString(CLIENTLOGLEVEL_PROP)); //$NON-NLS-1$
}
/**
@@ -127,7 +127,7 @@
* @return RMILog for logging DGC activity
*/
public static RMILog getDGCLog() {
- return getLog("harmony.rmi.dgc", getString(DGCLOGLEVEL_PROP));
+ return getLog("harmony.rmi.dgc", getString(DGCLOGLEVEL_PROP)); //$NON-NLS-1$
}
/**
@@ -138,7 +138,7 @@
* @return RMILog for logging activity of default RMIClassLoader provider
*/
public static RMILog getLoaderLog() {
- return getLog("harmony.rmi.loader", getString(LOADERLOGLEVEL_PROP));
+ return getLog("harmony.rmi.loader", getString(LOADERLOGLEVEL_PROP)); //$NON-NLS-1$
}
/**
@@ -149,7 +149,7 @@
* @return RMILog for logging transport-layer activity
*/
public static RMILog getTransportLog() {
- return getLog("harmony.rmi.transport.misc",
+ return getLog("harmony.rmi.transport.misc", //$NON-NLS-1$
getString(TRANSPORTLOGLEVEL_PROP));
}
@@ -161,7 +161,7 @@
* @return RMILog for logging TCP binding/connection activity
*/
public static RMILog getTcpTransportLog() {
- return getLog("harmony.rmi.transport.tcp",
+ return getLog("harmony.rmi.transport.tcp", //$NON-NLS-1$
getString(TRANSPORTTCPLOGLEVEL_PROP));
}
@@ -173,7 +173,7 @@
* @return RMILog for logging HTTP connections activity
*/
public static RMILog getProxyTransportLog() {
- return getLog("harmony.rmi.transport.proxy",
+ return getLog("harmony.rmi.transport.proxy", //$NON-NLS-1$
getString(TRANSPORTPROXYLOGLEVEL_PROP));
}
@@ -184,7 +184,7 @@
* @return RMILog for logging remote calls on server side
*/
public static RMILog getActivationLog() {
- return getLog("harmony.rmi.activation", getString(ACTIVATIONLOGLEVEL_PROP));
+ return getLog("harmony.rmi.activation", getString(ACTIVATIONLOGLEVEL_PROP)); //$NON-NLS-1$
}
/**
@@ -253,11 +253,11 @@
}
levelStr = levelStr.trim().toUpperCase();
- if (levelStr.equals("SILENT")) {
+ if (levelStr.equals("SILENT")) { //$NON-NLS-1$
return SILENT;
- } else if (levelStr.equals("BRIEF")) {
+ } else if (levelStr.equals("BRIEF")) { //$NON-NLS-1$
return BRIEF;
- } else if (levelStr.equals("VERBOSE")) {
+ } else if (levelStr.equals("VERBOSE")) { //$NON-NLS-1$
return VERBOSE;
}
Level logLevel = Level.OFF;
@@ -302,7 +302,7 @@
if (isLoggable(l)) {
String[] logSrc = getLogSource();
logger.logp(l, logSrc[0], logSrc[1],
- Thread.currentThread().getName() + ": " + msg);
+ Thread.currentThread().getName() + ": " + msg); //$NON-NLS-1$
}
}
@@ -318,7 +318,7 @@
if (isLoggable(l)) {
String[] logSrc = getLogSource();
logger.logp(l, logSrc[0], logSrc[1],
- Thread.currentThread().getName() + ": " + msg, t);
+ Thread.currentThread().getName() + ": " + msg, t); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIProperties.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIProperties.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIProperties.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIProperties.java Fri Oct 6 03:15:51 2006
@@ -36,16 +36,16 @@
* java.rmi.* supported properties
* -------------------------------------------------------------------------
*/
- String ACTIVATIONPORT_PROP = "java.rmi.activation.port";
- String DGCLEASEVALUE_PROP = "java.rmi.dgc.leaseValue";
- String CODEBASE_PROP = "java.rmi.server.codebase";
- String HOSTNAME_PROP = "java.rmi.server.hostname";
- String LOGSERVER_PROP = "java.rmi.server.logCalls";
- String RANDOMIDS_PROP = "java.rmi.server.randomIDs";
- String USECODEBASEONLY_PROP = "java.rmi.server.usecodebaseOnly";
- String USELOCALHOSTNAME_PROP = "java.rmi.server.useLocalHostname";
- String DISABLEHTTP_PROP = "java.rmi.server.disableHttp";
- String IGNORESTUBCLASSES_PROP = "java.rmi.server.ignoreStubClasses";
+ String ACTIVATIONPORT_PROP = "java.rmi.activation.port"; //$NON-NLS-1$
+ String DGCLEASEVALUE_PROP = "java.rmi.dgc.leaseValue"; //$NON-NLS-1$
+ String CODEBASE_PROP = "java.rmi.server.codebase"; //$NON-NLS-1$
+ String HOSTNAME_PROP = "java.rmi.server.hostname"; //$NON-NLS-1$
+ String LOGSERVER_PROP = "java.rmi.server.logCalls"; //$NON-NLS-1$
+ String RANDOMIDS_PROP = "java.rmi.server.randomIDs"; //$NON-NLS-1$
+ String USECODEBASEONLY_PROP = "java.rmi.server.usecodebaseOnly"; //$NON-NLS-1$
+ String USELOCALHOSTNAME_PROP = "java.rmi.server.useLocalHostname"; //$NON-NLS-1$
+ String DISABLEHTTP_PROP = "java.rmi.server.disableHttp"; //$NON-NLS-1$
+ String IGNORESTUBCLASSES_PROP = "java.rmi.server.ignoreStubClasses"; //$NON-NLS-1$
/*
* -------------------------------------------------------------------------
@@ -54,35 +54,35 @@
*/
// Server properties.
- String DGCACKTIMEOUT_PROP = "harmony.rmi.dgc.ackTimeout";
- String DGCCHECKINTERVAL_PROP = "harmony.rmi.dgc.checkInterval";
- String DGCLOGLEVEL_PROP = "harmony.rmi.dgc.logLevel";
- String LOADERLOGLEVEL_PROP = "harmony.rmi.loader.logLevel";
- String EXCEPTIONTRACE_PROP = "harmony.rmi.server.exceptionTrace";
- String SUPPRESSSTACKTRACES_PROP = "harmony.rmi.server.suppressStackTraces";
- String TRANSPORTLOGLEVEL_PROP = "harmony.rmi.transport.logLevel";
- String LOCALHOSTNAMETIMEOUT_PROP = "harmony.rmi.transport.tcp.localHostNameTimeOut";
- String TRANSPORTTCPLOGLEVEL_PROP = "harmony.rmi.transport.tcp.logLevel";
- String READTIMEOUT_PROP = "harmony.rmi.transport.tcp.readTimeout";
+ String DGCACKTIMEOUT_PROP = "harmony.rmi.dgc.ackTimeout"; //$NON-NLS-1$
+ String DGCCHECKINTERVAL_PROP = "harmony.rmi.dgc.checkInterval"; //$NON-NLS-1$
+ String DGCLOGLEVEL_PROP = "harmony.rmi.dgc.logLevel"; //$NON-NLS-1$
+ String LOADERLOGLEVEL_PROP = "harmony.rmi.loader.logLevel"; //$NON-NLS-1$
+ String EXCEPTIONTRACE_PROP = "harmony.rmi.server.exceptionTrace"; //$NON-NLS-1$
+ String SUPPRESSSTACKTRACES_PROP = "harmony.rmi.server.suppressStackTraces"; //$NON-NLS-1$
+ String TRANSPORTLOGLEVEL_PROP = "harmony.rmi.transport.logLevel"; //$NON-NLS-1$
+ String LOCALHOSTNAMETIMEOUT_PROP = "harmony.rmi.transport.tcp.localHostNameTimeOut"; //$NON-NLS-1$
+ String TRANSPORTTCPLOGLEVEL_PROP = "harmony.rmi.transport.tcp.logLevel"; //$NON-NLS-1$
+ String READTIMEOUT_PROP = "harmony.rmi.transport.tcp.readTimeout"; //$NON-NLS-1$
// Client properties.
- String LOGCLIENT_PROP = "harmony.rmi.client.logCalls";
- String DGCCLEANINTERVAL_PROP = "harmony.rmi.dgc.cleanInterval";
- String SERVERLOGLEVEL_PROP = "harmony.rmi.server.logLevel";
- String CLIENTLOGLEVEL_PROP = "harmony.rmi.client.logLevel";
- String CONNECTIONTIMEOUT_PROP = "harmony.rmi.transport.connectionTimeout";
- String CONNECTTIMEOUT_PROP = "harmony.rmi.transport.proxy.connectTimeout";
- String EAGERHTTPFALLBACK_PROP = "harmony.rmi.transport.proxy.eagerHttpFallback";
- String TRANSPORTPROXYLOGLEVEL_PROP = "harmony.rmi.transport.proxy.logLevel";
- String HANDSHAKETIMEOUT_PROP = "harmony.rmi.transport.tcp.handshakeTimeout";
+ String LOGCLIENT_PROP = "harmony.rmi.client.logCalls"; //$NON-NLS-1$
+ String DGCCLEANINTERVAL_PROP = "harmony.rmi.dgc.cleanInterval"; //$NON-NLS-1$
+ String SERVERLOGLEVEL_PROP = "harmony.rmi.server.logLevel"; //$NON-NLS-1$
+ String CLIENTLOGLEVEL_PROP = "harmony.rmi.client.logLevel"; //$NON-NLS-1$
+ String CONNECTIONTIMEOUT_PROP = "harmony.rmi.transport.connectionTimeout"; //$NON-NLS-1$
+ String CONNECTTIMEOUT_PROP = "harmony.rmi.transport.proxy.connectTimeout"; //$NON-NLS-1$
+ String EAGERHTTPFALLBACK_PROP = "harmony.rmi.transport.proxy.eagerHttpFallback"; //$NON-NLS-1$
+ String TRANSPORTPROXYLOGLEVEL_PROP = "harmony.rmi.transport.proxy.logLevel"; //$NON-NLS-1$
+ String HANDSHAKETIMEOUT_PROP = "harmony.rmi.transport.tcp.handshakeTimeout"; //$NON-NLS-1$
// Activation properties.
- String ACTIVATIONLOGLEVEL_PROP = "harmony.rmi.activation.logLevel";
- String ACTIVATION_EXECTIMEOUT_PROP = "harmony.rmi.activation.execTimeout";
- String MAXSTARTGROUP_PROP = "harmony.rmi.activation.groupThrottle";
- String ACTIVATION_SNAPSHOTINTERVAL_PROP = "harmony.rmi.activation.snapshotInterval";
- String ACTIVATION_LOG_DEBUG_PROP = "harmony.rmi.log.debug";
- String ACTIVATION_DEBUGEXEC_PROP = "harmony.rmi.server.activation.debugExec";
+ String ACTIVATIONLOGLEVEL_PROP = "harmony.rmi.activation.logLevel"; //$NON-NLS-1$
+ String ACTIVATION_EXECTIMEOUT_PROP = "harmony.rmi.activation.execTimeout"; //$NON-NLS-1$
+ String MAXSTARTGROUP_PROP = "harmony.rmi.activation.groupThrottle"; //$NON-NLS-1$
+ String ACTIVATION_SNAPSHOTINTERVAL_PROP = "harmony.rmi.activation.snapshotInterval"; //$NON-NLS-1$
+ String ACTIVATION_LOG_DEBUG_PROP = "harmony.rmi.log.debug"; //$NON-NLS-1$
+ String ACTIVATION_DEBUGEXEC_PROP = "harmony.rmi.server.activation.debugExec"; //$NON-NLS-1$
/*
* -------------------------------------------------------------------------
@@ -93,31 +93,31 @@
/**
* Name of the system property containing HTTP proxy host name.
*/
- String PROXY_HOST_PROP = "http.proxyHost";
+ String PROXY_HOST_PROP = "http.proxyHost"; //$NON-NLS-1$
/**
* Name of the system property containing HTTP proxy port number.
*/
- String PROXY_PORT_PROP = "http.proxyPort";
+ String PROXY_PORT_PROP = "http.proxyPort"; //$NON-NLS-1$
/**
* Name of the property allowing to disable direct socket connections.
*/
String DISABLE_DIRECT_SOCKET_PROP =
- "org.apache.harmony.rmi.transport.disableDirectSocket";
+ "org.apache.harmony.rmi.transport.disableDirectSocket"; //$NON-NLS-1$
/**
* Name of the property allowing to enable direct HTTP connections.
*/
String ENABLE_DIRECT_HTTP_PROP =
- "org.apache.harmony.rmi.transport.proxy.enableDirectHTTP";
+ "org.apache.harmony.rmi.transport.proxy.enableDirectHTTP"; //$NON-NLS-1$
/**
* Name of the property allowing to disable plain HTTP connections
* (and force CGI instead).
*/
String DISABLE_PLAIN_HTTP_PROP =
- "org.apache.harmony.rmi.transport.proxy.disablePlainHTTP";
+ "org.apache.harmony.rmi.transport.proxy.disablePlainHTTP"; //$NON-NLS-1$
/*
* -------------------------------------------------------------------------
@@ -129,7 +129,7 @@
* @see org.apache.harmony.rmi.common.RMIConstants#DEFAULT_ACTIVATION_MONITOR_CLASS_NAME
*/
String ACTIVATION_MONITOR_CLASS_NAME_PROP =
- "org.apache.harmony.rmi.activation.monitor";
+ "org.apache.harmony.rmi.activation.monitor"; //$NON-NLS-1$
/*
* -------------------------------------------------------------------------
@@ -141,17 +141,17 @@
* Property specifying the compiler class to use.
*/
String JAVA_COMPILER_CLASS_PROPERTY =
- "org.apache.harmony.rmi.compiler.class";
+ "org.apache.harmony.rmi.compiler.class"; //$NON-NLS-1$
/**
* Property specifying the compiler class method to use.
*/
String JAVA_COMPILER_METHOD_PROPERTY =
- "org.apache.harmony.rmi.compiler.method";
+ "org.apache.harmony.rmi.compiler.method"; //$NON-NLS-1$
/**
* Property specifying the compiler executable to use.
*/
String JAVA_COMPILER_EXECUTABLE_PROPERTY =
- "org.apache.harmony.rmi.compiler.executable";
+ "org.apache.harmony.rmi.compiler.executable"; //$NON-NLS-1$
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/RMIUtil.java Fri Oct 6 03:15:51 2006
@@ -44,6 +44,8 @@
import java.util.List;
import java.util.Map;
+import org.apache.harmony.rmi.internal.nls.Messages;
+
/**
* Utility class for RMI implementation.
@@ -131,7 +133,7 @@
public static String getCanonicalName(Class cls) {
if (cls.isArray()) {
// Use recursion to create name for array class.
- return (getCanonicalName(cls.getComponentType()) + "[]");
+ return (getCanonicalName(cls.getComponentType()) + "[]"); //$NON-NLS-1$
}
Class declaring = cls.getDeclaringClass();
@@ -155,7 +157,7 @@
public static String getShortCanonicalName(Class cls) {
if (cls.isArray()) {
// Use recursion to create name for array class.
- return (getShortCanonicalName(cls.getComponentType()) + "[]");
+ return (getShortCanonicalName(cls.getComponentType()) + "[]"); //$NON-NLS-1$
}
// The last dot in full name separates class name from package name.
@@ -180,7 +182,7 @@
public static String getShortName(Class cls) {
if (cls.isArray()) {
// Use recursion to create name for array class.
- return (getShortName(cls.getComponentType()) + "[]");
+ return (getShortName(cls.getComponentType()) + "[]"); //$NON-NLS-1$
}
String name = cls.getName();
int index = name.lastIndexOf('.');
@@ -204,7 +206,7 @@
public static String getSimpleName(Class cls) {
if (cls.isArray()) {
// Use recursion to create name for array class.
- return (getSimpleName(cls.getComponentType()) + "[]");
+ return (getSimpleName(cls.getComponentType()) + "[]"); //$NON-NLS-1$
}
String name = cls.getName();
Class declaring = cls.getDeclaringClass();
@@ -231,23 +233,23 @@
*/
public static String getSystemName(Class cls) {
if (cls == boolean.class) {
- return "Z";
+ return "Z"; //$NON-NLS-1$
} else if (cls == char.class) {
- return "C";
+ return "C"; //$NON-NLS-1$
} else if (cls == byte.class) {
- return "B";
+ return "B"; //$NON-NLS-1$
} else if (cls == short.class) {
- return "S";
+ return "S"; //$NON-NLS-1$
} else if (cls == int.class) {
- return "I";
+ return "I"; //$NON-NLS-1$
} else if (cls == long.class) {
- return "J";
+ return "J"; //$NON-NLS-1$
} else if (cls == float.class) {
- return "F";
+ return "F"; //$NON-NLS-1$
} else if (cls == double.class) {
- return "D";
+ return "D"; //$NON-NLS-1$
} else if (cls == void.class) {
- return "V";
+ return "V"; //$NON-NLS-1$
} else { // Object type.
String className = cls.getName().replace('.', '/');
@@ -313,7 +315,7 @@
// Append names of parameter types.
for (int i = 0; i < parameters.length; i++) {
if (i > 0) {
- buffer.append(", ");
+ buffer.append(", "); //$NON-NLS-1$
}
buffer.append(getCanonicalName(parameters[i]));
}
@@ -339,7 +341,7 @@
// Create signature suffix for array types.
while (cls.isArray()) {
- suffix.append("[]");
+ suffix.append("[]"); //$NON-NLS-1$
cls = cls.getComponentType();
}
return (getCanonicalName(cls) + ' '
@@ -366,7 +368,7 @@
// Append short names of parameter types.
for (int i = 0; i < parameters.length; i++) {
- buffer.append(((i > 0) ? ", " : "")
+ buffer.append(((i > 0) ? ", " : "") //$NON-NLS-1$ //$NON-NLS-2$
+ getShortCanonicalName(parameters[i]));
}
return buffer.append(')').toString();
@@ -391,8 +393,9 @@
throws IllegalArgumentException {
if (!iface.isInterface()) {
// This is not an interface.
- throw new IllegalArgumentException(iface.getName()
- + " is not an interface");
+ // rmi.45={0} is not an interface
+ throw new IllegalArgumentException(Messages.getString("rmi.45", //$NON-NLS-1$
+ iface.getName()));
}
if (!Remote.class.isAssignableFrom(iface)) {
@@ -415,10 +418,9 @@
if (((Class) j.next()).isAssignableFrom(RemoteException.class))
continue methods;
}
- throw new IllegalArgumentException(iface.getName()
- + " is not a valid remote interface: method "
- + getBasicMethodSignature(method)
- + " must throw java.rmi.RemoteException");
+ // rmi.46={0} is not a valid remote interface: method {1} must throw java.rmi.RemoteException
+ throw new IllegalArgumentException(Messages.getString(
+ "rmi.46", iface.getName(), getBasicMethodSignature(method))); //$NON-NLS-1$
}
return true;
}
@@ -546,7 +548,8 @@
}
}
}
- throw new IllegalArgumentException("The specified class is not remote");
+ // rmi.47=The specified class is not remote
+ throw new IllegalArgumentException(Messages.getString("rmi.47")); //$NON-NLS-1$
}
/**
Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/SubProcess.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/SubProcess.java?view=diff&rev=453541&r1=453540&r2=453541
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/SubProcess.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/common/SubProcess.java Fri Oct 6 03:15:51 2006
@@ -29,6 +29,8 @@
import java.io.InputStream;
import java.io.OutputStream;
+import org.apache.harmony.rmi.internal.nls.Messages;
+
/**
* Allows for execution of external applications as subprocesses.
@@ -44,7 +46,7 @@
* Default argument to {@link #tell(String)}
* and expect {@link #expect(String)} methods.
*/
- public static final String READY_STRING = "PROCESS_READY";
+ public static final String READY_STRING = "PROCESS_READY"; //$NON-NLS-1$
/**
* Process.
@@ -451,8 +453,8 @@
*/
public void tell(String str) throws IllegalStateException, IOException {
if (dataOutput == null) {
- throw new IllegalStateException(
- "Subprocess output stream control disabled");
+ // rmi.48=Subprocess output stream control disabled
+ throw new IllegalStateException(Messages.getString("rmi.48")); //$NON-NLS-1$
}
tell(dataOutput, str);
}
@@ -593,8 +595,8 @@
public void expect(String str, boolean whole, boolean ignoreCase)
throws IllegalStateException, IOException {
if (dataInput == null) {
- throw new IllegalStateException(
- "Subprocess input stream control disabled");
+ // rmi.49=Subprocess input stream control disabled
+ throw new IllegalStateException(Messages.getString("rmi.49")); //$NON-NLS-1$
}
expect(dataInput, str, whole, ignoreCase);
}
@@ -656,8 +658,8 @@
public void expectError(String str, boolean whole, boolean ignoreCase)
throws IllegalStateException, IOException {
if (dataError == null) {
- throw new IllegalStateException(
- "Subprocess error stream control disabled");
+ // rmi.4A=Subprocess error stream control disabled
+ throw new IllegalStateException(Messages.getString("rmi.4A")); //$NON-NLS-1$
}
expect(dataError, str, whole, ignoreCase);
}
@@ -820,10 +822,12 @@
output.flush();
}
}
+ // rmi.4B=read(byte[]) returned unexpected value: {0}
assert (len == -1)
- : ("read(byte[]) returned unexpected value: " + len);
+ : (Messages.getString("rmi.4B", len)); //$NON-NLS-1$
} catch (IOException e) {
- System.err.print("StreamPipe error: ");
+ // rmi.console.07=StreamPipe error:
+ System.err.print(Messages.getString("rmi.console.07")); //$NON-NLS-1$
e.printStackTrace();
}
}