View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership. The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License. You may obtain a copy of the License at
9    * 
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   * 
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.apache.river.phoenix.dl;
20  
21  import org.apache.river.proxy.MarshalledWrapper;
22  import java.rmi.Remote;
23  import java.rmi.RemoteException;
24  import java.rmi.activation.ActivationException;
25  import java.rmi.activation.ActivationID;
26  import java.rmi.activation.UnknownObjectException;
27  import net.jini.io.MarshalledInstance;
28  
29  /**
30   * The activator used by {@link AID}.  The {@link #activate activate}
31   * method returns the activated object's proxy as a {@link
32   * MarshalledInstance} wrapped in a {@link MarshalledWrapper} so that
33   * integrity can be verified on the enclosed proxy.
34   *
35   * @author Sun Microsystems, Inc.
36   * @since 2.0
37   **/
38  public interface Activator extends Remote {
39  
40      /**
41       * Returns a marshalled proxy wrapped in a
42       * <code>MarshalledWrapper</code> for the activated object
43       * corresponding to the specified activation identifier.
44       *
45       * @param id the activation identifier for the remote object
46       * @param force the value to pass to the <code>activate</code> method
47       * of the activation identifier
48       * @return the remote object's proxy as a <code>MarshalledInstance</code>
49       * wrapped in a <code>MarshalledWrapper</code> 
50       * @throws ActivationException if object activation fails
51       * @throws UnknownObjectException if object is unknown (not registered)
52       * @throws RemoteException if remote call fails
53       **/
54      MarshalledWrapper activate(ActivationID id, boolean force)
55  	throws ActivationException, RemoteException; 
56      
57  
58  }