ProxyFactory.java 848 Bytes
Newer Older
Matt Tucker's avatar
Matt Tucker committed
1 2 3 4 5
/**
 * $RCSfile$
 * $Revision$
 * $Date$
 *
6
 * Copyright (C) 2004 Jive Software. All rights reserved.
Matt Tucker's avatar
Matt Tucker committed
7
 *
8 9
 * This software is published under the terms of the GNU Public License (GPL),
 * a copy of which is included in this distribution.
Matt Tucker's avatar
Matt Tucker committed
10
 */
11

Matt Tucker's avatar
Matt Tucker committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
package org.jivesoftware.util;

import org.jivesoftware.messenger.auth.AuthToken;
import org.jivesoftware.messenger.auth.Permissions;

/**
 * An interface that defines a method to create proxy objects based on an authToken and permissions.
 *
 * @author Iain Shigeoka
 */
public interface ProxyFactory {

    /**
     * Creates a new proxy for <tt>obj</tt> using the specified authToken and permissions, or
     * returns null if the user doesn't have permission to read the object.
     *
     * @return a new proxy.
     */
    public Object createProxy(Object obj, AuthToken auth, Permissions perms);
}