Debian Codegraph @

rhino/src/org/mozilla/javascript/commonjs/module/provider/UrlConnectionSecurityDomainProvider.java

raw symbols SCIP
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 package org.mozilla.javascript.commonjs.module.provider;
6
7 import java.net.URLConnection;
8
9 import org.mozilla.javascript.Context;
10
11 /**
12 * Interface for URL connection based security domain providers. Used by
13 * {@link UrlModuleSourceProvider} to create Rhino security domain objects for
14 * newly loaded scripts (see {@link Context#compileReader(java.io.Reader,
15 * String, int, Object)}, in {@link Context}) based on the properties obtainable through their URL
16 * connection.
17 * @author Attila Szegedi
18 * @version $Id: UrlConnectionSecurityDomainProvider.java,v 1.3 2011/04/07 20:26:12 hannes%helma.at Exp $
19 */
20 public interface UrlConnectionSecurityDomainProvider
21 {
22 /**
23 * Create a new security domain object for a script source identified by
24 * its URL connection.
25 * @param urlConnection the URL connection of the script source
26 * @return the security domain object for the script source. Can be null if
27 * no security domain object can be created, although it is advisable for
28 * the implementations to be able to create a security domain object for
29 * any URL connection.
30 */
31 public Object getSecurityDomain(URLConnection urlConnection);
32 }