Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/rmi/activation/ActivationMonitor.java
38918 views
/*1* Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.rmi.activation;2627import java.rmi.MarshalledObject;28import java.rmi.Remote;29import java.rmi.RemoteException;30import java.rmi.activation.UnknownGroupException;31import java.rmi.activation.UnknownObjectException;3233/**34* An <code>ActivationMonitor</code> is specific to an35* <code>ActivationGroup</code> and is obtained when a group is36* reported active via a call to37* <code>ActivationSystem.activeGroup</code> (this is done38* internally). An activation group is responsible for informing its39* <code>ActivationMonitor</code> when either: its objects become active or40* inactive, or the group as a whole becomes inactive.41*42* @author Ann Wollrath43* @see Activator44* @see ActivationSystem45* @see ActivationGroup46* @since 1.247*/48public interface ActivationMonitor extends Remote {4950/**51* An activation group calls its monitor's52* <code>inactiveObject</code> method when an object in its group53* becomes inactive (deactivates). An activation group discovers54* that an object (that it participated in activating) in its VM55* is no longer active, via calls to the activation group's56* <code>inactiveObject</code> method. <p>57*58* The <code>inactiveObject</code> call informs the59* <code>ActivationMonitor</code> that the remote object reference60* it holds for the object with the activation identifier,61* <code>id</code>, is no longer valid. The monitor considers the62* reference associated with <code>id</code> as a stale reference.63* Since the reference is considered stale, a subsequent64* <code>activate</code> call for the same activation identifier65* results in re-activating the remote object.<p>66*67* @param id the object's activation identifier68* @exception UnknownObjectException if object is unknown69* @exception RemoteException if remote call fails70* @since 1.271*/72public void inactiveObject(ActivationID id)73throws UnknownObjectException, RemoteException;7475/**76* Informs that an object is now active. An <code>ActivationGroup</code>77* informs its monitor if an object in its group becomes active by78* other means than being activated directly (i.e., the object79* is registered and "activated" itself).80*81* @param id the active object's id82* @param obj the marshalled form of the object's stub83* @exception UnknownObjectException if object is unknown84* @exception RemoteException if remote call fails85* @since 1.286*/87public void activeObject(ActivationID id,88MarshalledObject<? extends Remote> obj)89throws UnknownObjectException, RemoteException;9091/**92* Informs that the group is now inactive. The group will be93* recreated upon a subsequent request to activate an object94* within the group. A group becomes inactive when all objects95* in the group report that they are inactive.96*97* @param id the group's id98* @param incarnation the group's incarnation number99* @exception UnknownGroupException if group is unknown100* @exception RemoteException if remote call fails101* @since 1.2102*/103public void inactiveGroup(ActivationGroupID id,104long incarnation)105throws UnknownGroupException, RemoteException;106107}108109110