Add method to set security support after creation.

This commit is contained in:
nboyd%atg.com 2001-03-10 11:50:50 +00:00
Родитель 153f49ecaf
Коммит 6838842027
2 изменённых файлов: 34 добавлений и 0 удалений

Просмотреть файл

@ -1354,6 +1354,7 @@ public final class Context {
/**
* Remove a Context listener.
* @param listener the listener to remove.
*/
public static void removeContextListener(ContextListener listener) {
if (contextListeners == null)
@ -1363,6 +1364,22 @@ public final class Context {
contextListeners.removeElementAt(i);
}
}
/**
* Set the security support for this context.
* <p> SecuritySupport may only be set if it is currently null.
* Otherwise a SecurityException is thrown.
* @param securitySupportObj a SecuritySupport object
* @throws SecurityException if there is already a SecuritySupport
* object for this Context
*/
public void setSecuritySupport(SecuritySupport securitySupportObj) {
if (securitySupport != null) {
throw new SecurityException("Cannot overwrite existing " +
"SecuritySupport object");
}
securitySupport = securitySupportObj;
}
/**
* Return true if a security domain is required on calls to

Просмотреть файл

@ -1354,6 +1354,7 @@ public final class Context {
/**
* Remove a Context listener.
* @param listener the listener to remove.
*/
public static void removeContextListener(ContextListener listener) {
if (contextListeners == null)
@ -1363,6 +1364,22 @@ public final class Context {
contextListeners.removeElementAt(i);
}
}
/**
* Set the security support for this context.
* <p> SecuritySupport may only be set if it is currently null.
* Otherwise a SecurityException is thrown.
* @param securitySupportObj a SecuritySupport object
* @throws SecurityException if there is already a SecuritySupport
* object for this Context
*/
public void setSecuritySupport(SecuritySupport securitySupportObj) {
if (securitySupport != null) {
throw new SecurityException("Cannot overwrite existing " +
"SecuritySupport object");
}
securitySupport = securitySupportObj;
}
/**
* Return true if a security domain is required on calls to