You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by ni...@apache.org on 2008/12/10 06:12:29 UTC

svn commit: r724976 [5/6] - in /incubator/river/jtsk/skunk/niclas1/services/phoenix: ./ src/ src/main/ src/main/java/ src/main/java/com/ src/main/java/com/sun/ src/main/java/com/sun/jini/ src/main/java/com/sun/jini/phoenix/ src/main/java/com/sun/jini/p...

Added: incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessILFactory.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessILFactory.java?rev=724976&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessILFactory.java (added)
+++ incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessILFactory.java Tue Dec  9 21:12:27 2008
@@ -0,0 +1,310 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.jini.phoenix;
+
+import java.lang.reflect.Method;
+import java.rmi.Remote;
+import java.rmi.activation.ActivationGroupDesc;
+import java.rmi.activation.ActivationSystem;
+import java.rmi.server.ExportException;
+import java.util.Collection;
+import net.jini.core.constraint.InvocationConstraints;
+import net.jini.core.constraint.MethodConstraints;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicInvocationDispatcher;
+import net.jini.jeri.InvocationDispatcher;
+import net.jini.jeri.ServerCapabilities;
+
+/**
+ * Invocation layer factory for exporting an {@link ActivationSystem}
+ * to use Jini extensible remote invocation (Jini ERI), that is similar
+ * to {@link BasicILFactory} except the remote object must be an
+ * <code>ActivationSystem</code> instance and the returned dispatcher
+ * optionally accepts calls from the local host and optionally enforces a
+ * {@link GroupPolicy} on calls to {@link ActivationSystem#registerGroup
+ * registerGroup} and {@link ActivationSystem#setActivationGroupDesc
+ * setActivationGroupDesc}.
+ *
+ * @author Sun Microsystems, Inc.
+ * @see SystemAccessProxyTrustILFactory
+ * @since 2.0
+ */
+public class SystemAccessILFactory extends BasicILFactory
+{
+    /**
+     * The group policy, if any.
+     */
+    private final GroupPolicy policy;
+
+    /**
+     * If true, check that client is calling from the local host.
+     */
+    private final boolean localAccessCheck;
+
+    /**
+     * Creates an invocation layer factory that creates an invocation
+     * dispatcher with a {@link DefaultGroupPolicy} instance and a
+     * <code>null</code> class loader.  This invocation dispatcher only
+     * accepts calls from the local host and enforces the group policy on
+     * calls to {@link ActivationSystem#registerGroup registerGroup} and
+     * {@link ActivationSystem#setActivationGroupDesc
+     * setActivationGroupDesc}.
+     */
+    public SystemAccessILFactory()
+    {
+        this( new DefaultGroupPolicy(), null );
+    }
+
+    /**
+     * Creates an invocation layer factory that creates an invocation
+     * dispatcher with the specified group policy and the specified class
+     * loader.  This invocation dispatcher only accepts calls from the
+     * local host and enforces the specified group policy (if
+     * non-<code>null</code>) on calls to {@link
+     * ActivationSystem#registerGroup registerGroup} and {@link
+     * ActivationSystem#setActivationGroupDesc setActivationGroupDesc}.
+     *
+     * @param loader the class loader, or <code>null</code>
+     * @param policy the group policy, or <code>null</code>
+     */
+    public SystemAccessILFactory( GroupPolicy policy, ClassLoader loader )
+    {
+        super( null, null, loader );
+        this.policy = policy;
+        this.localAccessCheck = true;
+    }
+
+    /**
+     * Creates a factory with a <code>null</code> class loader, the
+     * specified server constraints, the {@link SystemPermission}
+     * permission class, and a {@link DefaultGroupPolicy} instance.
+     *
+     * @param serverConstraints the server constraints, or <code>null</code>
+     */
+    public SystemAccessILFactory( MethodConstraints serverConstraints )
+    {
+        this( serverConstraints, SystemPermission.class,
+              new DefaultGroupPolicy(), null );
+    }
+
+    /**
+     * Creates a factory with the specified server constraints, permission
+     * class, group policy, and class loader.  This factory creates an
+     * invocation dispatcher that enforces the specified group policy (if
+     * non-<code>null</code>) on calls to {@link
+     * ActivationSystem#registerGroup registerGroup} and {@link
+     * ActivationSystem#setActivationGroupDesc setActivationGroupDesc}.
+     *
+     * @param serverConstraints the server constraints, or <code>null</code>
+     * @param permClass         the permission class, or <code>null</code>
+     * @param policy            the group policy, or <code>null</code>
+     * @param loader            the class loader, or <code>null</code>
+     * @throws IllegalArgumentException if the permission class is abstract, is
+     *                                  not a subclass of {@link java.security.Permission}, or does not have
+     *                                  a public constructor that has either one <code>String</code> parameter
+     *                                  or one {@link Method} parameter and has no declared exceptions
+     */
+    public SystemAccessILFactory( MethodConstraints serverConstraints,
+                                  Class permClass,
+                                  GroupPolicy policy,
+                                  ClassLoader loader )
+    {
+        super( serverConstraints, permClass, loader );
+        this.policy = policy;
+        this.localAccessCheck = false;
+    }
+
+    /**
+     * Returns a {@link SystemDispatcher} instance constructed with the
+     * specified methods, the class loader specified during construction,
+     * the remote object, server capabilities, and the server constraints,
+     * permission class, and group policy that this factory was constructed
+     * with and a flag indicating whether the dispatcher should only accept
+     * calls from the local host.
+     *
+     * @return a {@link SystemDispatcher} instance constructed with the
+     *         specified methods, remote object, and server capabilities, and the
+     *         server constraints, permission class, group policy, local host access
+     *         check condition, and class loader that this factory was constructed
+     *         with
+     * @throws NullPointerException {@inheritDoc}
+     */
+    protected InvocationDispatcher
+    createInvocationDispatcher( Collection methods,
+                                Remote impl,
+                                ServerCapabilities caps )
+        throws ExportException
+    {
+        if( impl == null )
+        {
+            throw new NullPointerException( "impl cannot be null" );
+        }
+        else if( !( impl instanceof ActivationSystem ) )
+        {
+            throw new ExportException( "cannot create dispatcher",
+                                       new IllegalArgumentException(
+                                           "impl must be an ActivationSystem" ) );
+        }
+        return new SystemDispatcher( methods, impl, caps,
+                                     getServerConstraints(),
+                                     getPermissionClass(), policy,
+                                     localAccessCheck, getClassLoader() );
+    }
+
+    /**
+     * A subclass of {@link BasicInvocationDispatcher} for
+     * <code>ActivationSystem</code> instances that optionally enforces a
+     * {@link GroupPolicy} on calls to <code>registerGroup</code> and
+     * <code>setActivationGroupDesc</code>.
+     */
+    public static class SystemDispatcher extends BasicInvocationDispatcher
+    {
+        /**
+         * The group policy, if any.
+         */
+        private final GroupPolicy policy;
+
+        /**
+         * If true, check that client is calling from the local host.
+         */
+        private final boolean localAccessCheck;
+
+        /**
+         * Creates an invocation dispatcher to receive incoming remote calls
+         * for the specified methods, for a server and transport with the
+         * specified capabilities, enforcing the specified constraints, and
+         * performing preinvocation access control using the specified
+         * permission class and group policy.  The specified class loader
+         * is used by the {@link #createMarshalInputStream
+         * createMarshalInputStream} method.
+         *
+         * <p>For each combination of constraints that might need to be
+         * enforced (obtained by calling the {@link
+         * MethodConstraints#possibleConstraints possibleConstraints}
+         * method on the specified server constraints, or using an empty
+         * constraints instance of the specified server constraints
+         * instance is <code>null</code>), calling the {@link
+         * ServerCapabilities#checkConstraints checkConstraints}
+         * method of the specified capabilities object with those
+         * constraints must return <code>true</code>, or an
+         * <code>ExportException</code> is thrown.
+         *
+         * @param methods           a collection of {@link Method} instances for the
+         *                          remote methods
+         * @param impl              the remote object
+         * @param serverCaps        the transport capabilities of the server
+         * @param serverConstraints the server constraints, or
+         *                          <code>null</code>
+         * @param permClass         the permission class, or <code>null</code>
+         * @param policy            the group policy, or <code>null</code>
+         * @param localAccessCheck  if <code>true</code>, calls are only
+         *                          accepted from the local host
+         * @param loader            the class loader, or <code>null</code>
+         * @throws IllegalArgumentException if <code>impl</code> is not an
+         *                                  instance of {@link ActivationSystem} or if the permission class is
+         *                                  abstract, is not a subclass of {@link java.security.Permission},
+         *                                  or does not have a public constructor that has either one
+         *                                  <code>String</code> parameter or one {@link Method} parameter and
+         *                                  has no declared exceptions, or if any element of
+         *                                  <code>methods</code> is not a {@link Method} instance
+         * @throws NullPointerException     if <code>impl</code>,
+         *                                  <code>methods</code> or <code>serverCaps</code> is
+         *                                  <code>null</code>, or if <code>methods</code> contains a
+         *                                  <code>null</code> element
+         * @throws ExportException          if any of the possible server constraints
+         *                                  cannot be satisfied according to the specified server capabilities
+         */
+        public SystemDispatcher( Collection methods,
+                                 Remote impl,
+                                 ServerCapabilities serverCaps,
+                                 MethodConstraints serverConstraints,
+                                 Class permClass,
+                                 GroupPolicy policy,
+                                 boolean localAccessCheck,
+                                 ClassLoader loader )
+            throws ExportException
+        {
+            super( methods, serverCaps, serverConstraints, permClass, loader );
+            if( impl == null )
+            {
+                throw new NullPointerException( "impl is null" );
+            }
+            if( !( impl instanceof ActivationSystem ) )
+            {
+                throw new IllegalArgumentException(
+                    "impl not an ActivationSystem instance" );
+            }
+            this.policy = policy;
+            this.localAccessCheck = localAccessCheck;
+        }
+
+        /**
+         * Checks that the client is calling from the local host.
+         *
+         * @throws java.security.AccessControlException
+         *          if the client is not
+         *          calling from the local host
+         */
+        protected void checkAccess( Remote impl,
+                                    Method method,
+                                    InvocationConstraints constraints,
+                                    Collection context )
+        {
+            if( localAccessCheck )
+            {
+                LocalAccess.check();
+            }
+            else
+            {
+                super.checkAccess( impl, method, constraints, context );
+            }
+        }
+
+        /**
+         * Checks the group policy as necessary, and then calls the superclass
+         * <code>invoke</code> method with the same arguments, and returns
+         * the result. If the policy is not <code>null</code> and the
+         * specified method is <code>ActivationSystem.registerGroup</code> or
+         * <code>ActivationSystem.setActivationGroupDesc</code>, the policy
+         * is checked by calling its {@link GroupPolicy#checkGroup checkGroup}
+         * method with the <code>ActivationGroupDesc</code> argument.
+         *
+         * @throws SecurityException if the caller is not permitted to use
+         *                           the specified group descriptor
+         */
+        protected Object invoke( Remote impl,
+                                 Method method,
+                                 Object[] args,
+                                 Collection context )
+            throws Throwable
+        {
+            if( policy != null )
+            {
+                String op = method.getName();
+                if( op.equals( "registerGroup" ) ||
+                    op.equals( "setActivationGroupDesc"))
+		{
+		    policy.checkGroup(
+				  (ActivationGroupDesc) args[args.length - 1]);
+		}
+	    }
+	    return super.invoke(impl, method, args, context);
+	}
+    }
+}

Added: incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessProxyTrustILFactory.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessProxyTrustILFactory.java?rev=724976&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessProxyTrustILFactory.java (added)
+++ incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemAccessProxyTrustILFactory.java Tue Dec  9 21:12:27 2008
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.jini.phoenix;
+
+import java.lang.reflect.Method;
+import java.rmi.Remote;
+import java.rmi.activation.ActivationSystem;
+import java.rmi.server.ExportException;
+import java.util.Collection;
+import net.jini.core.constraint.MethodConstraints;
+import net.jini.jeri.InvocationDispatcher;
+import net.jini.jeri.ProxyTrustILFactory;
+import net.jini.jeri.ServerCapabilities;
+
+/**
+ * Invocation layer factory for exporting an {@link ActivationSystem}
+ * to use Jini extensible remote invocation (Jini ERI), that is similar
+ * to {@link ProxyTrustILFactory} except the remote object must be an
+ * <code>ActivationSystem</code> instance and the returned dispatcher
+ * optionally accepts calls from the local host and optionally enforces a
+ * {@link GroupPolicy} on calls to {@link ActivationSystem#registerGroup
+ * registerGroup} and {@link ActivationSystem#setActivationGroupDesc
+ * setActivationGroupDesc}.
+ *
+ * @author Sun Microsystems, Inc.
+ * @see SystemAccessILFactory
+ * @since 2.0.1
+ */
+public class SystemAccessProxyTrustILFactory extends ProxyTrustILFactory
+{
+    /**
+     * The group policy, if any.
+     */
+    private final GroupPolicy policy;
+
+    /**
+     * If true, check that client is calling from the local host.
+     */
+    private final boolean localAccessCheck;
+
+    /**
+     * Creates an invocation layer factory that creates an invocation
+     * dispatcher with a {@link DefaultGroupPolicy} instance and a
+     * <code>null</code> class loader.  This invocation dispatcher only
+     * accepts calls from the local host and enforces the group policy on
+     * calls to {@link ActivationSystem#registerGroup registerGroup} and
+     * {@link ActivationSystem#setActivationGroupDesc
+     * setActivationGroupDesc}.
+     */
+    public SystemAccessProxyTrustILFactory()
+    {
+        this( new DefaultGroupPolicy(), null );
+    }
+
+    /**
+     * Creates an invocation layer factory that creates an invocation
+     * dispatcher with the specified group policy and the specified class
+     * loader.  This invocation dispatcher only accepts calls from the
+     * local host and enforces the specified group policy (if
+     * non-<code>null</code>) on calls to {@link
+     * ActivationSystem#registerGroup registerGroup} and {@link
+     * ActivationSystem#setActivationGroupDesc setActivationGroupDesc}.
+     *
+     * @param loader the class loader, or <code>null</code>
+     * @param policy the group policy, or <code>null</code>
+     */
+    public SystemAccessProxyTrustILFactory( GroupPolicy policy,
+                                            ClassLoader loader )
+    {
+        super( null, null, loader );
+        this.policy = policy;
+        this.localAccessCheck = true;
+    }
+
+    /**
+     * Creates a factory with a <code>null</code> class loader, the
+     * specified server constraints, the {@link SystemPermission}
+     * permission class, and a {@link DefaultGroupPolicy} instance.
+     *
+     * @param serverConstraints the server constraints, or <code>null</code>
+     */
+    public SystemAccessProxyTrustILFactory( MethodConstraints serverConstraints )
+    {
+        this( serverConstraints, SystemPermission.class,
+              new DefaultGroupPolicy(), null );
+    }
+
+    /**
+     * Creates a factory with the specified server constraints, permission
+     * class, group policy, and class loader.  This factory creates an
+     * invocation dispatcher that enforces the specified group policy (if
+     * non-<code>null</code>) on calls to {@link
+     * ActivationSystem#registerGroup registerGroup} and {@link
+     * ActivationSystem#setActivationGroupDesc setActivationGroupDesc}.
+     *
+     * @param serverConstraints the server constraints, or <code>null</code>
+     * @param permClass         the permission class, or <code>null</code>
+     * @param policy            the group policy, or <code>null</code>
+     * @param loader            the class loader, or <code>null</code>
+     * @throws IllegalArgumentException if the permission class is abstract, is
+     *                                  not a subclass of {@link java.security.Permission}, or does not have
+     *                                  a public constructor that has either one <code>String</code> parameter
+     *                                  or one {@link Method} parameter and has no declared exceptions
+     */
+    public SystemAccessProxyTrustILFactory( MethodConstraints serverConstraints,
+                                            Class permClass,
+                                            GroupPolicy policy,
+                                            ClassLoader loader )
+    {
+        super( serverConstraints, permClass, loader );
+        this.policy = policy;
+        this.localAccessCheck = false;
+    }
+
+    /**
+     * Returns a
+     * {@link com.sun.jini.phoenix.SystemAccessILFactory.SystemDispatcher}
+     * instance constructed with the specified methods, the class loader
+     * specified during construction, the remote object, server capabilities,
+     * and the server constraints, permission class, and group policy that
+     * this factory was constructed with and a flag indicating whether the
+     * dispatcher should only accept calls from the local host.
+     *
+     * @return a
+     *         {@link com.sun.jini.phoenix.SystemAccessILFactory.SystemDispatcher}
+     *         instance constructed with the specified methods, remote object, and
+     *         server capabilities, and the server constraints, permission class,
+     *         group policy, local host access check condition, and class loader that
+     *         this factory was constructed with
+     * @throws NullPointerException {@inheritDoc}
+     */
+    protected InvocationDispatcher
+    createInvocationDispatcher( Collection methods,
+                                Remote impl,
+                                ServerCapabilities caps )
+        throws ExportException
+    {
+        if( impl == null )
+        {
+            throw new NullPointerException( "impl cannot be null" );
+        }
+        else if( !( impl instanceof ActivationSystem ) )
+        {
+            throw new ExportException( "cannot create dispatcher",
+                                       new IllegalArgumentException(
+                                           "impl must be an ActivationSystem" ) );
+        }
+        return new SystemAccessILFactory.SystemDispatcher(
+            methods, impl, caps,
+            getServerConstraints(),
+            getPermissionClass(), policy,
+            localAccessCheck, getClassLoader() );
+    }
+}

Added: incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemPermission.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemPermission.java?rev=724976&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemPermission.java (added)
+++ incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/SystemPermission.java Tue Dec  9 21:12:27 2008
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.jini.phoenix;
+
+import net.jini.security.AccessPermission;
+
+/**
+ * Represents permissions that can be used to express the access control
+ * policy for the {@link java.rmi.activation.ActivationSystem} remote
+ * object exported with
+ * {@link net.jini.jeri.BasicJeriExporter}. This
+ * class can be passed to
+ * {@link net.jini.jeri.BasicInvocationDispatcher},
+ * and then used in security policy permission grants.
+ * <p>
+ * An instance contains a name (also referred to as a "target name") but no
+ * actions list; you either have the named permission or you don't. The
+ * convention is that the target name is the fully qualified name of the
+ * remote method being invoked. Wildcard matches are supported using the
+ * syntax specified by {@link AccessPermission}.
+ * <p>
+ * The possible target names are:
+ * <table border=1 cellpadding=5>
+ * <tr>
+ * <th>Permission Target Name</th>
+ * <th>What the Permission Allows</th>
+ * <th>Risks of Allowing this Permission</th>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.activeGroup</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#activeGroup
+ * ActivationSystem.activeGroup}</td>
+ * <td>The caller can inject itself as the instantiation of a group if the
+ * group is currently being activated.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.getActivationDesc</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#getActivationDesc
+ * ActivationSystem.getActivationDesc}</td>
+ * <td>The caller can obtain the descriptor for an existing activatable object
+ * if it knows the activation identifier.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.getActivationGroupDesc</td>
+ * <td>invoking
+ * {@link java.rmi.activation.ActivationSystem#getActivationGroupDesc
+ * ActivationSystem.getActivationGroupDesc}</td>
+ * <td>The caller can obtain the descriptor for an existing activation group
+ * if it knows the activation group identifier.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.registerGroup</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#registerGroup
+ * ActivationSystem.registerGroup}</td>
+ * <td>The caller can register new activation groups.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.registerObject</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#registerObject
+ * ActivationSystem.registerObject}</td>
+ * <td>The caller can register new activatable objects.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.setActivationDesc</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#setActivationDesc
+ * ActivationSystem.setActivationDesc}</td>
+ * <td>The caller can replace the descriptor for an existing activatable
+ * object if it knows the activation identifier.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.setActivationGroupDesc</td>
+ * <td>invoking
+ * {@link java.rmi.activation.ActivationSystem#setActivationGroupDesc
+ * ActivationSystem.setActivationGroupDesc}</td>
+ * <td>The caller can replace the descriptor for an existing activation group
+ * if it knows the activation group identifier.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.shutdown</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#shutdown
+ * ActivationSystem.shutdown}</td>
+ * <td>The caller can shut down the activation system.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.unregisterObject</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#unregisterObject
+ * ActivationSystem.unregisterObject}</td>
+ * <td>The caller can unregister existing activatable objects if it knows
+ * their activation identifiers.</td>
+ * </tr>
+ * <tr>
+ * <td>java.rmi.activation.ActivationSystem.unregisterGroup</td>
+ * <td>invoking {@link java.rmi.activation.ActivationSystem#unregisterGroup
+ * ActivationSystem.unregisterGroup}</td>
+ * <td>The caller can unregister existing activation groups if it knows
+ * their activation group identifiers.</td>
+ * </tr>
+ * <tr>
+ * <td>com.sun.jini.phoenix.ActivationAdmin.getActivationGroups</td>
+ * <td>invoking {@link com.sun.jini.phoenix.ActivationAdmin#getActivationGroups
+ * ActivationAdmin.getActivationGroups}</td>
+ * <td>The caller can obtain the activation group identifiers and
+ * descriptors for all registered activation groups</td>
+ * </tr>
+ * <tr>
+ * <td>com.sun.jini.phoenix.ActivationAdmin.getActivatableObjects</td>
+ * <td>invoking
+ * {@link com.sun.jini.phoenix.ActivationAdmin#getActivatableObjects
+ * ActivationAdmin.getActivatableObjects}</td>
+ * <td>The caller can obtain the activation identifiers and
+ * descriptors for all registered activatable objects in an activation group
+ * if it knows the activation group identifier</td>
+ * </tr>
+ * </table>
+ *
+ * @author Sun Microsystems, Inc.
+ * @since 2.0
+ */
+public final class SystemPermission extends AccessPermission
+{
+    private static final long serialVersionUID = -3058499612160420636L;
+
+    /**
+     * Creates an instance with the specified name.
+     *
+     * @param name the target name
+     */
+    public SystemPermission( String name )
+    {
+        super( name );
+    }
+}

Added: incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/build.xml
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/build.xml?rev=724976&view=auto
==============================================================================
--- incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/build.xml (added)
+++ incubator/river/jtsk/skunk/niclas1/services/phoenix/src/main/java/com/sun/jini/phoenix/build.xml Tue Dec  9 21:12:27 2008
@@ -0,0 +1,368 @@
+<!--
+ ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements.  See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership. The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License. You may obtain a copy of the License at
+ ! 
+ !      http://www.apache.org/licenses/LICENSE-2.0
+ ! 
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+
+<project name="phoenix" basedir="." default="all">
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## ENVIRONMENT SETTINGS						-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <property name="top" location="../../../../.."/>
+
+  <property name="pkg-path" value="com/sun/jini/${ant.project.name}"/>
+
+  <!-- ##								-->
+  <!-- ## Set java-source for use with the javac task:			-->
+  <!-- ##								-->
+
+  <property name="java-source" value="${pkg-path}/**/*.java"/>
+
+  <import file="${top}/build_common.xml"/>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: all							-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="all"
+          description=""
+          depends="compile,
+		   this.stubs">
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##                                                               -->
+  <!-- ## TARGET: clean                                                 -->
+  <!-- ##                                                               -->
+  <!-- ################################################################ -->
+
+  <target name="clean"
+          description="Removes all files and dirs created by the build."
+          depends="clean.jre.ext">
+
+    <delete dir="${build.classes}/${pkg-path}"
+            quiet="true" verbose="false"/>
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: this.jars						-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="this.jars"
+          depends="phoenix.jar,
+		   phoenix-dl.jar,
+		   phoenix-group.jar,
+		   phoenix-init.jar">
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: phoenix.jar						-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="phoenix.jar"
+          depends="tools">
+
+    <property name="phoenix.deps" location="${build.deps}/phoenix.deps"/>
+
+    <!-- ##								-->
+    <!-- ## Run ClassDep.						-->
+    <!-- ##								-->
+
+    <java classname="com.sun.jini.tool.ClassDep"
+          failonerror="true"
+          output="${phoenix.deps}">
+
+      <classpath refid="path.classdep"/>
+      <arg value="-cp"/>
+      <arg path="${build.classes}"/>
+      <arg value="-files"/>
+      <arg line="${jskprivate.include}"/>
+
+      <arg line="-in com.sun.jini.phoenix"/>
+
+      <arg value="com.sun.jini.phoenix.AccessILFactory"/>
+      <arg value="com.sun.jini.phoenix.Activation"/>
+      <arg value="com.sun.jini.phoenix.ActivatorPermission"/>
+      <arg value="com.sun.jini.phoenix.ActivatorSunJrmpExporter"/>
+      <arg value="com.sun.jini.phoenix.MonitorAccessExporter"/>
+      <arg value="com.sun.jini.phoenix.MonitorPermission"/>
+      <arg value="com.sun.jini.phoenix.PhoenixConstants"/>
+      <arg value="com.sun.jini.phoenix.RegistrySunExporter"/>
+      <arg value="com.sun.jini.phoenix.SystemAccessExporter"/>
+      <arg value="com.sun.jini.phoenix.SystemAccessILFactory"/>
+      <arg value="com.sun.jini.phoenix.SystemAccessProxyTrustILFactory"/>
+      <arg value="com.sun.jini.phoenix.SystemPermission"/>
+
+      <arg value="com.sun.jini.phoenix.AbstractActivator_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractInstantiator_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractMonitor_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractRegistry_Skel"/>
+      <arg value="com.sun.jini.phoenix.AbstractRegistry_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractSystem_Stub"/>
+
+    </java>
+
+    <!-- ##								-->
+    <!-- ## Generate the jar file.					-->
+    <!-- ##								-->
+
+    <delete file="${build.lib}/phoenix.jar" quiet="true"/>
+
+    <jar destfile="${build.lib}/phoenix.jar"
+         index="false"
+         manifest="${src.jini.manifest}/phoenix.mf">
+
+      <fileset dir="${build.classes}"
+               includesfile="${phoenix.deps}"/>
+
+      <fileset dir="${src.jini}"
+               includes="com/sun/jini/phoenix/resources/*.properties"/>
+    </jar>
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: phoenix-dl.jar					-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="phoenix-dl.jar"
+          depends="tools">
+
+    <property name="phoenix-dl.deps" location="${build.deps}/phoenix-dl.deps"/>
+
+    <!-- ##								-->
+    <!-- ## Run ClassDep.						-->
+    <!-- ##								-->
+
+    <java classname="com.sun.jini.tool.ClassDep"
+          failonerror="true"
+          output="${phoenix-dl.deps}">
+
+      <classpath refid="path.classdep"/>
+      <arg value="-cp"/>
+      <arg path="${build.classes}"/>
+      <arg value="-files"/>
+      <arg line="${jskprivate.include}"/>
+
+      <arg line="-in com.sun.jini.phoenix"/>
+
+      <arg value="com.sun.jini.phoenix.ConstrainableAID"/>
+      <arg value="com.sun.jini.phoenix.SystemPermission"/>
+      <arg value="com.sun.jini.phoenix.ActivatorPermission"/>
+      <arg value="com.sun.jini.phoenix.MonitorPermission"/>
+      <arg value="com.sun.jini.phoenix.ExecOptionPermission"/>
+      <arg value="com.sun.jini.phoenix.ExecPermission"/>
+      <arg value="com.sun.jini.phoenix.InactiveGroupException"/>
+      <arg value="com.sun.jini.proxy.BasicProxyTrustVerifier"/>
+      <arg value="com.sun.jini.phoenix.AbstractActivator_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractMonitor_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractSystem_Stub"/>
+      <arg value="com.sun.jini.phoenix.AbstractRegistry_Stub"/>
+
+    </java>
+
+    <!-- ##								-->
+    <!-- ## Generate the jar file.					-->
+    <!-- ##								-->
+
+    <delete file="${build.lib-dl}/phoenix-dl.jar" quiet="true"/>
+
+    <jar destfile="${build.lib-dl}/phoenix-dl.jar"
+         index="false">
+
+      <fileset dir="${build.classes}"
+               includesfile="${phoenix-dl.deps}"/>
+
+    </jar>
+
+    <!-- ##								-->
+    <!-- ## Generate the Preferred List					-->
+    <!-- ##								-->
+
+    <preferredlistgen>
+
+      <plg-elements>
+
+        <arg line="-cp"/>
+        <arg path="${build.lib}/jsk-platform.jar"/>
+
+        <arg line="-jar"/>
+        <arg path="${build.lib-dl}/phoenix-dl.jar"/>
+
+        <arg line="-jar"/>
+        <arg path="${build.lib-dl}/jsk-dl.jar"/>
+
+        <arg line="-proxy com.sun.jini.phoenix.AbstractSystem_Stub"/>
+
+      </plg-elements>
+
+    </preferredlistgen>
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: phoenix-group.jar					-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="phoenix-group.jar"
+          depends="tools">
+
+    <property name="phoenix-group.deps" location="${build.deps}/phoenix-group.deps"/>
+
+    <!-- ##								-->
+    <!-- ## Run ClassDep.						-->
+    <!-- ##								-->
+
+    <java classname="com.sun.jini.tool.ClassDep"
+          failonerror="true"
+          output="${phoenix-group.deps}">
+
+      <classpath refid="path.classdep"/>
+      <arg value="-cp"/>
+      <arg path="${build.classes}"/>
+      <arg value="-files"/>
+      <arg line="${jskplatform.exclude}"/>
+      <arg line="-in com.sun.jini"/>
+      <arg line="-in net.jini"/>
+
+      <arg value="com.sun.jini.phoenix.ActivationGroupImpl"/>
+      <arg value="com.sun.jini.phoenix.AccessILFactory"/>
+      <arg value="com.sun.jini.phoenix.InstantiatorAccessExporter"/>
+      <arg value="com.sun.jini.phoenix.InstantiatorPermission"/>
+      <arg value="com.sun.jini.phoenix.AbstractInstantiator_Stub"/>
+
+    </java>
+
+    <!-- ##								-->
+    <!-- ## Generate the jar file.					-->
+    <!-- ##								-->
+
+    <delete file="${build.lib}/phoenix-group.jar" quiet="true"/>
+
+    <jar destfile="${build.lib}/phoenix-group.jar"
+         index="false">
+
+      <fileset dir="${build.classes}" includesfile="${phoenix-group.deps}"/>
+
+      <metainf dir="${src.jini.manifest}/phoenix-group/META-INF"/>
+
+    </jar>
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: phoenix-init.jar					-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="phoenix-init.jar"
+          depends="tools">
+
+    <property name="phoenix-init.deps" location="${build.deps}/phoenix-init.deps"/>
+
+    <!-- ##								-->
+    <!-- ## Run ClassDep.						-->
+    <!-- ##								-->
+
+    <java classname="com.sun.jini.tool.ClassDep"
+          failonerror="true"
+          output="${phoenix-init.deps}">
+
+      <classpath refid="path.classdep"/>
+      <arg value="-cp"/>
+      <arg path="${build.classes}"/>
+      <arg value="-files"/>
+      <arg line="${jskplatform.exclude}"/>
+      <arg line="-in com.sun.jini"/>
+      <arg line="-in net.jini"/>
+
+      <arg value="com.sun.jini.phoenix.ActivationGroupInit"/>
+
+    </java>
+
+    <!-- ##								-->
+    <!-- ## Generate the jar file.					-->
+    <!-- ##								-->
+
+    <delete file="${build.lib}/phoenix-init.jar" quiet="true"/>
+
+    <jar destfile="${build.lib}/phoenix-init.jar"
+         index="false">
+
+      <fileset dir="${build.classes}" includesfile="${phoenix-init.deps}"/>
+
+    </jar>
+
+  </target>
+
+
+  <!-- ################################################################ -->
+  <!-- ##								-->
+  <!-- ## TARGET: this.stubs						-->
+  <!-- ##								-->
+  <!-- ################################################################ -->
+
+  <target name="this.stubs"
+          description="Builds the RMI stubs for ${ant.project.name}."
+          depends="compile">
+
+    <rmic base="${build.classes}" stubversion="1.2">
+
+      <classpath refid="path.jini"/>
+
+      <include name="com/sun/jini/phoenix/AbstractActivator.class"/>
+      <include name="com/sun/jini/phoenix/AbstractMonitor.class"/>
+      <include name="com/sun/jini/phoenix/AbstractSystem.class"/>
+      <include name="com/sun/jini/phoenix/AbstractInstantiator.class"/>
+
+    </rmic>
+
+    <rmic base="${build.classes}" stubversion="1.1">
+
+      <classpath refid="path.jini"/>
+
+      <include name="com/sun/jini/phoenix/AbstractRegistry.class"/>
+
+    </rmic>
+
+  </target>
+
+</project>
+