public KeepAlive run() { return new KeepAlive(); } });
/** * Returns the tie (if any) for a given target object. * * @return the tie or null if no tie is registered for the given target. */ public Tie getTie(Remote target) { synchronized (exportedServants) { return lookupTie(target); } }
public KeepAlive() { setDaemon(false); }
Tie cachedTie = lookupTie(target); if (cachedTie != null) try cleanUpTie(cachedTie); keepAlive.quit(); keepAlive = null;
public void unregisterTargetsForORB(org.omg.CORBA.ORB orb) { for (Enumeration<?> e = exportedServants.keys(); e.hasMoreElements();) { java.lang.Object key = e.nextElement(); Remote target = (Remote) (key instanceof Tie ? ((Tie) key).getTarget() : key); // Bug 4476347: BAD_OPERATION is thrown if the ties delegate isn't set. // We can ignore this because it means the tie is not connected to an ORB. try { if (orb == getTie(target).orb()) { try { unexportObject(target); } catch (java.rmi.NoSuchObjectException ex) { // We neglect this exception if at all if it is raised. It is not harmful. } } } catch (BAD_OPERATION bad) { /* Ignore */ } } }
/** * Returns a hash code value for the object which is the same for all stubs that represent the same remote object. * * @return the hash code value. */ public int hashCode(javax.rmi.CORBA.Stub self) { init(self); return ior.hashCode(); }
/** * Wraps an exception thrown by an implementation method. It returns the corresponding client-side exception. * * @param orig * the exception to wrap. * @return the wrapped exception. */ public RemoteException wrapException(Throwable orig) { if (orig instanceof SystemException) { return mapSystemException((SystemException) orig); } if (orig instanceof Error) { return new ServerError("Error occurred in server thread", (Error) orig); } else if (orig instanceof RemoteException) { return new ServerException("RemoteException occurred in server thread", (Exception) orig); } else if (orig instanceof RuntimeException) { throw (RuntimeException) orig; } if (orig instanceof Exception) return new UnexpectedException(orig.toString(), (Exception) orig); else return new UnexpectedException(orig.toString()); }
return (Object[]) copyObject(result, orb); return (Object[]) copyObject(obj, orb);
Tie cachedTie = lookupTie(target); if (cachedTie != null) try cleanUpTie(cachedTie); keepAlive.quit(); keepAlive = null;
public void unregisterTargetsForORB(org.omg.CORBA.ORB orb) { for (Enumeration<?> e = exportedServants.keys(); e.hasMoreElements();) { java.lang.Object key = e.nextElement(); Remote target = (Remote) (key instanceof Tie ? ((Tie) key).getTarget() : key); // Bug 4476347: BAD_OPERATION is thrown if the ties delegate isn't set. // We can ignore this because it means the tie is not connected to an ORB. try { if (orb == getTie(target).orb()) { try { unexportObject(target); } catch (java.rmi.NoSuchObjectException ex) { // We neglect this exception if at all if it is raised. It is not harmful. } } } catch (BAD_OPERATION bad) { /* Ignore */ } } }
/** * Returns a hash code value for the object which is the same for all stubs that represent the same remote object. * * @return the hash code value. */ public int hashCode(javax.rmi.CORBA.Stub self) { init(self); return ior.hashCode(); }
public KeepAlive run() { return new KeepAlive(); } });
/** * Returns the tie (if any) for a given target object. * * @return the tie or null if no tie is registered for the given target. */ public Tie getTie(Remote target) { synchronized (exportedServants) { return lookupTie(target); } }
public KeepAlive() { setDaemon(false); }
/** * Wraps an exception thrown by an implementation method. It returns the corresponding client-side exception. * * @param orig * the exception to wrap. * @return the wrapped exception. */ public RemoteException wrapException(Throwable orig) { if (orig instanceof SystemException) { return mapSystemException((SystemException) orig); } if (orig instanceof Error) { return new ServerError("Error occurred in server thread", (Error) orig); } else if (orig instanceof RemoteException) { return new ServerException("RemoteException occurred in server thread", (Exception) orig); } else if (orig instanceof RuntimeException) { throw (RuntimeException) orig; } if (orig instanceof Exception) return new UnexpectedException(orig.toString(), (Exception) orig); else return new UnexpectedException(orig.toString()); }
return (Object[]) copyObject(result, orb); return (Object[]) copyObject(obj, orb);
/** * Serialization method to save the IOR state. * * @serialData The length of the IOR type ID (int), followed by the IOR type ID (byte array encoded using * ISO8859-1), followed by the number of IOR profiles (int), followed by the IOR profiles. Each IOR * profile is written as a profile tag (int), followed by the length of the profile data (int), followed * by the profile data (byte array). */ public void writeObject(javax.rmi.CORBA.Stub self, java.io.ObjectOutputStream stream) throws IOException { init(self); ior.doWrite(stream); } }
/** * Serialization method to save the IOR state. * * @serialData The length of the IOR type ID (int), followed by the IOR type ID (byte array encoded using * ISO8859-1), followed by the number of IOR profiles (int), followed by the IOR profiles. Each IOR * profile is written as a profile tag (int), followed by the length of the profile data (int), followed * by the profile data (byte array). */ public void writeObject(javax.rmi.CORBA.Stub self, java.io.ObjectOutputStream stream) throws IOException { init(self); ior.doWrite(stream); } }