0N/A/*
2362N/A * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.rmi.activation;
0N/A
0N/Aimport java.rmi.MarshalledObject;
0N/Aimport java.rmi.Remote;
0N/Aimport java.rmi.RemoteException;
0N/Aimport java.rmi.activation.UnknownGroupException;
0N/Aimport java.rmi.activation.UnknownObjectException;
0N/A
0N/A/**
0N/A * An <code>ActivationMonitor</code> is specific to an
0N/A * <code>ActivationGroup</code> and is obtained when a group is
0N/A * reported active via a call to
0N/A * <code>ActivationSystem.activeGroup</code> (this is done
0N/A * internally). An activation group is responsible for informing its
0N/A * <code>ActivationMonitor</code> when either: its objects become active or
0N/A * inactive, or the group as a whole becomes inactive.
0N/A *
0N/A * @author Ann Wollrath
0N/A * @see Activator
0N/A * @see ActivationSystem
0N/A * @see ActivationGroup
0N/A * @since 1.2
0N/A */
0N/Apublic interface ActivationMonitor extends Remote {
0N/A
0N/A /**
0N/A * An activation group calls its monitor's
0N/A * <code>inactiveObject</code> method when an object in its group
0N/A * becomes inactive (deactivates). An activation group discovers
0N/A * that an object (that it participated in activating) in its VM
0N/A * is no longer active, via calls to the activation group's
0N/A * <code>inactiveObject</code> method. <p>
0N/A *
0N/A * The <code>inactiveObject</code> call informs the
0N/A * <code>ActivationMonitor</code> that the remote object reference
0N/A * it holds for the object with the activation identifier,
0N/A * <code>id</code>, is no longer valid. The monitor considers the
0N/A * reference associated with <code>id</code> as a stale reference.
0N/A * Since the reference is considered stale, a subsequent
0N/A * <code>activate</code> call for the same activation identifier
0N/A * results in re-activating the remote object.<p>
0N/A *
0N/A * @param id the object's activation identifier
0N/A * @exception UnknownObjectException if object is unknown
0N/A * @exception RemoteException if remote call fails
0N/A * @since 1.2
0N/A */
0N/A public void inactiveObject(ActivationID id)
0N/A throws UnknownObjectException, RemoteException;
0N/A
0N/A /**
0N/A * Informs that an object is now active. An <code>ActivationGroup</code>
0N/A * informs its monitor if an object in its group becomes active by
0N/A * other means than being activated directly (i.e., the object
0N/A * is registered and "activated" itself).
0N/A *
0N/A * @param id the active object's id
0N/A * @param obj the marshalled form of the object's stub
0N/A * @exception UnknownObjectException if object is unknown
0N/A * @exception RemoteException if remote call fails
0N/A * @since 1.2
0N/A */
0N/A public void activeObject(ActivationID id,
0N/A MarshalledObject<? extends Remote> obj)
0N/A throws UnknownObjectException, RemoteException;
0N/A
0N/A /**
0N/A * Informs that the group is now inactive. The group will be
0N/A * recreated upon a subsequent request to activate an object
0N/A * within the group. A group becomes inactive when all objects
0N/A * in the group report that they are inactive.
0N/A *
0N/A * @param id the group's id
0N/A * @param incarnation the group's incarnation number
0N/A * @exception UnknownGroupException if group is unknown
0N/A * @exception RemoteException if remote call fails
0N/A * @since 1.2
0N/A */
0N/A public void inactiveGroup(ActivationGroupID id,
0N/A long incarnation)
0N/A throws UnknownGroupException, RemoteException;
0N/A
0N/A}