/// <summary> /// Compares two activation ids for content equality. /// Returns true if both of the following conditions are true: /// 1) the unique identifiers equivalent (by content), and /// 2) the activator specified in each identifier /// refers to the same remote object. /// </summary> /// <param name="obj"> the Object to compare with </param> /// <returns> true if these Objects are equal; false otherwise. </returns> /// <seealso cref= java.util.Hashtable /// @since 1.2 </seealso> public override bool Equals(Object obj) { if (obj is ActivationID) { ActivationID id = (ActivationID)obj; return(Uid.Equals(id.Uid) && Activator.Equals(id.Activator)); } else { return(false); } }
//JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET: //ORIGINAL LINE: public abstract java.rmi.MarshalledObject<JavaToDotNetGenericWildcard> newInstance(ActivationID id, ActivationDesc desc); public abstract MarshalledObject <?> NewInstance(ActivationID id, ActivationDesc desc);
/// <summary> /// The group's <code>activeObject</code> method is called when an /// object is exported (either by <code>Activatable</code> object /// construction or an explicit call to /// <code>Activatable.exportObject</code>. The group must inform its /// <code>ActivationMonitor</code> that the object is active (via /// the monitor's <code>activeObject</code> method) if the group /// hasn't already done so. /// </summary> /// <param name="id"> the object's identifier </param> /// <param name="obj"> the remote object implementation </param> /// <exception cref="UnknownObjectException"> if object is not registered </exception> /// <exception cref="RemoteException"> if call informing monitor fails </exception> /// <exception cref="ActivationException"> if group is inactive /// @since 1.2 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public abstract void activeObject(ActivationID id, java.rmi.Remote obj) throws ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException; public abstract void ActiveObject(ActivationID id, Remote obj);
/// <summary> /// This protected method is necessary for subclasses to /// make the <code>activeObject</code> callback to the group's /// monitor. The call is simply forwarded to the group's /// <code>ActivationMonitor</code>. /// </summary> /// <param name="id"> the object's identifier </param> /// <param name="mobj"> a marshalled object containing the remote object's stub </param> /// <exception cref="UnknownObjectException"> if object is not registered </exception> /// <exception cref="RemoteException"> if call informing monitor fails </exception> /// <exception cref="ActivationException"> if an activation error occurs /// @since 1.2 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: protected void activeObject(ActivationID id, java.rmi.MarshalledObject<? extends java.rmi.Remote> mobj) throws ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException protected internal virtual void activeObject <T1>(ActivationID id, MarshalledObject <T1> mobj) where T1 : java.rmi.Remote { Monitor.ActiveObject(id, mobj); }
/// <summary> /// The group's <code>inactiveObject</code> method is called /// indirectly via a call to the <code>Activatable.inactive</code> /// method. A remote object implementation must call /// <code>Activatable</code>'s <code>inactive</code> method when /// that object deactivates (the object deems that it is no longer /// active). If the object does not call /// <code>Activatable.inactive</code> when it deactivates, the /// object will never be garbage collected since the group keeps /// strong references to the objects it creates. /// /// <para>The group's <code>inactiveObject</code> method unexports the /// remote object from the RMI runtime so that the object can no /// longer receive incoming RMI calls. An object will only be unexported /// if the object has no pending or executing calls. /// The subclass of <code>ActivationGroup</code> must override this /// method and unexport the object. /// /// </para> /// <para>After removing the object from the RMI runtime, the group /// must inform its <code>ActivationMonitor</code> (via the monitor's /// <code>inactiveObject</code> method) that the remote object is /// not currently active so that the remote object will be /// re-activated by the activator upon a subsequent activation /// request. /// /// </para> /// <para>This method simply informs the group's monitor that the object /// is inactive. It is up to the concrete subclass of ActivationGroup /// </para> /// to fulfill the additional requirement of unexporting the object. <para> /// /// </para> /// </summary> /// <param name="id"> the object's activation identifier </param> /// <returns> true if the object was successfully deactivated; otherwise /// returns false. </returns> /// <exception cref="UnknownObjectException"> if object is unknown (may already /// be inactive) </exception> /// <exception cref="RemoteException"> if call informing monitor fails </exception> /// <exception cref="ActivationException"> if group is inactive /// @since 1.2 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public boolean inactiveObject(ActivationID id) throws ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException public virtual bool InactiveObject(ActivationID id) { Monitor.InactiveObject(id); return(true); }