/[classpath]/classpath/gnu/java/rmi/server/UnicastServer.java
ViewVC logotype

Diff of /classpath/gnu/java/rmi/server/UnicastServer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mark, Tue Jan 22 22:26:57 2002 UTC revision 1.3 by cbj, Thu Mar 21 05:40:11 2002 UTC
# Line 65  public static void exportObject(UnicastS Line 65  public static void exportObject(UnicastS
65          obj.manager.startServer();          obj.manager.startServer();
66  }  }
67    
68    // FIX ME: I haven't handle force parameter
69    public static boolean unexportObject(UnicastServerRef obj, boolean force) {
70            objects.remove(obj.objid);
71            obj.manager.stopServer();
72            return true;
73    }
74    
75  private static synchronized void startDGC() {  private static synchronized void startDGC() {
76          if (dgc == null) {          if (dgc == null) {
77                  try {                  try {
# Line 100  private static void incomingMessageCall( Line 107  private static void incomingMessageCall(
107          UnicastServerRef uref = (UnicastServerRef)objects.get(objid);          UnicastServerRef uref = (UnicastServerRef)objects.get(objid);
108          Object returnval;          Object returnval;
109          int returncode = RETURN_ACK;          int returncode = RETURN_ACK;
110            // returnval is from Method.invoke(), so we must check the return class to see
111            // if it's primitive type
112            Class returncls = null;
113          if (uref != null) {          if (uref != null) {
114                  try {                  try {
115                          // Dispatch the call to it.                          // Dispatch the call to it.
116                          returnval = uref.incomingMessageCall(conn, method, hash);                          returnval = uref.incomingMessageCall(conn, method, hash);
117                            returncls = uref.getMethodReturnType(method, hash);
118                  }                  }
119                  catch (Exception e) {                  catch (Exception e) {
120                          returnval = e;                          returnval = e;
# Line 121  private static void incomingMessageCall( Line 132  private static void incomingMessageCall(
132    
133          out.writeByte(returncode);          out.writeByte(returncode);
134          (new UID()).write(out);          (new UID()).write(out);
135          out.writeObject(returnval);          if(returnval != null && returncls != null)
136                ((RMIObjectOutputStream)out).writeValue(returnval, returncls);
137            else
138                out.writeObject(returnval);
139    
140          out.flush();          out.flush();
141  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26