gpt4 book ai didi

org.wildfly.security.manager.action.WritePropertyAction类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 06:43:05 25 4
gpt4 key购买 nike

本文整理了Java中org.wildfly.security.manager.action.WritePropertyAction类的一些代码示例,展示了WritePropertyAction类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritePropertyAction类的具体详情如下:
包路径:org.wildfly.security.manager.action.WritePropertyAction
类名称:WritePropertyAction

WritePropertyAction介绍

[英]A privileged action for setting a system property.
[中]设置系统属性的特权操作。

代码示例

代码示例来源:origin: wildfly/wildfly

/**
 * Set a property, doing a faster permission check that skips having to execute a privileged action frame.
 *
 * @param name the property name
 * @param value the value ot set
 * @return the previous property value, or {@code null} if there was none
 */
public static String setPropertyPrivileged(String name, String value) {
  final SecurityManager sm = getSecurityManager();
  if (sm == null) {
    return setProperty(name, value);
  }
  if (sm instanceof WildFlySecurityManager) {
    final Context ctx = CTX.get();
    if (! ctx.checking) {
      return setProperty(name, value);
    }
    ctx.checking = false;
    try {
      checkPropertyWritePermission(getCallerClass(2), name);
      return setProperty(name, value);
    } finally {
      ctx.checking = true;
    }
  } else {
    checkPropertyWritePermission(getCallerClass(2), name);
    return doPrivileged(new WritePropertyAction(name, value));
  }
}

代码示例来源:origin: org.wildfly.camel/wildfly-camel-subsystem-core

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: wildfly-extras/wildfly-camel

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: wildfly-extras/wildfly-camel

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: org.wildfly.camel/wildfly-camel-subsystem-core

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: org.wildfly.camel/wildfly-camel-subsystem-core

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: wildfly-extras/wildfly-camel

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: wildfly-extras/wildfly-camel

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: org.wildfly.camel/wildfly-camel-subsystem-core

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: wildfly-extras/wildfly-camel

static String setSystemProperty(final String key, final String value) {
  return getSecurityManager() == null ? setProperty(key, value) : doPrivileged(new WritePropertyAction(key, value));
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

/**
 * Set a property, doing a faster permission check that skips having to execute a privileged action frame.
 *
 * @param name the property name
 * @param value the value ot set
 * @return the previous property value, or {@code null} if there was none
 */
public static String setPropertyPrivileged(String name, String value) {
  final SecurityManager sm = getSecurityManager();
  if (sm == null) {
    return setProperty(name, value);
  }
  if (sm instanceof WildFlySecurityManager) {
    final Context ctx = CTX.get();
    if (! ctx.checking) {
      return setProperty(name, value);
    }
    ctx.checking = false;
    try {
      checkPropertyWritePermission(getCallerClass(2), name);
      return setProperty(name, value);
    } finally {
      ctx.checking = true;
    }
  } else {
    checkPropertyWritePermission(getCallerClass(2), name);
    return doPrivileged(new WritePropertyAction(name, value));
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Set a property, doing a faster permission check that skips having to execute a privileged action frame.
 *
 * @param name the property name
 * @param value the value ot set
 * @return the previous property value, or {@code null} if there was none
 */
public static String setPropertyPrivileged(String name, String value) {
  final SecurityManager sm = getSecurityManager();
  if (sm == null) {
    return setProperty(name, value);
  }
  if (sm instanceof WildFlySecurityManager) {
    final Context ctx = CTX.get();
    if (! ctx.checking) {
      return setProperty(name, value);
    }
    ctx.checking = false;
    try {
      checkPropertyWritePermission(getCallerClass(2), name);
      return setProperty(name, value);
    } finally {
      ctx.checking = true;
    }
  } else {
    checkPropertyWritePermission(getCallerClass(2), name);
    return doPrivileged(new WritePropertyAction(name, value));
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-security-manager

/**
 * Set a property, doing a faster permission check that skips having to execute a privileged action frame.
 *
 * @param name the property name
 * @param value the value ot set
 * @return the previous property value, or {@code null} if there was none
 */
public static String setPropertyPrivileged(String name, String value) {
  final SecurityManager sm = getSecurityManager();
  if (sm == null) {
    return setProperty(name, value);
  }
  if (sm instanceof WildFlySecurityManager) {
    final Context ctx = CTX.get();
    if (! ctx.checking) {
      return setProperty(name, value);
    }
    ctx.checking = false;
    try {
      checkPropertyWritePermission(getCallerClass(2), name);
      return setProperty(name, value);
    } finally {
      ctx.checking = true;
    }
  } else {
    checkPropertyWritePermission(getCallerClass(2), name);
    return doPrivileged(new WritePropertyAction(name, value));
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-security-manager

/**
 * Set a property, doing a faster permission check that skips having to execute a privileged action frame.
 *
 * @param name the property name
 * @param value the value ot set
 * @return the previous property value, or {@code null} if there was none
 */
public static String setPropertyPrivileged(String name, String value) {
  final SecurityManager sm = getSecurityManager();
  if (sm == null) {
    return setProperty(name, value);
  }
  if (sm instanceof WildFlySecurityManager) {
    final Context ctx = CTX.get();
    if (! ctx.checking) {
      return setProperty(name, value);
    }
    ctx.checking = false;
    try {
      checkPropertyWritePermission(getCallerClass(2), name);
      return setProperty(name, value);
    } finally {
      ctx.checking = true;
    }
  } else {
    checkPropertyWritePermission(getCallerClass(2), name);
    return doPrivileged(new WritePropertyAction(name, value));
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com