/* * @(#)ActivationInstantiator.java 1.15 03/12/19 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.rmi.activation; import java.rmi.MarshalledObject; import java.rmi.Remote; import java.rmi.RemoteException; /** * An ActivationInstantiator is responsible for creating * instances of "activatable" objects. A concrete subclass of * ActivationGroup implements the newInstance * method to handle creating objects within the group. * * @author Ann Wollrath * @version 1.15, 12/19/03 * @see ActivationGroup * @since 1.2 */ public interface ActivationInstantiator extends Remote { /** * The activator calls an instantiator's newInstance * method in order to recreate in that group an object with the * activation identifier, id, and descriptor, * desc. The instantiator is responsible for: * * @param id the object's activation identifier * @param desc the object's descriptor * @return a marshalled object containing the serialized * representation of remote object's stub * @exception ActivationException if object activation fails * @exception RemoteException if remote call fails * @since 1.2 */ public MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException; }