本文整理汇总了Java中javax.security.auth.message.MessageInfo.toString方法的典型用法代码示例。如果您正苦于以下问题:Java MessageInfo.toString方法的具体用法?Java MessageInfo.toString怎么用?Java MessageInfo.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.security.auth.message.MessageInfo
的用法示例。
在下文中一共展示了MessageInfo.toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAuthContextID
import javax.security.auth.message.MessageInfo; //导入方法依赖的package包/类
/**
* Checks for the presence of
* {@value #JAVAX_SECURITY_AUTH_MESSAGE_MESSAGE_POLICY_IS_MANDATORY} in the
* map.
*
* @param messageInfo
* contains the message request, response and some system
* populated map.
* @return the string representation of the {@link MessageInfo} if it is
* mandatory, <code>null</code> otherwise.
*/
@Override
public String getAuthContextID(final MessageInfo messageInfo) {
final Object isMandatory = messageInfo.getMap()
.get(JAVAX_SECURITY_AUTH_MESSAGE_MESSAGE_POLICY_IS_MANDATORY);
if (isMandatory != null && isMandatory instanceof String && Boolean.valueOf((String) isMandatory)) {
return messageInfo.toString();
}
return null;
}
示例2: getAuthContextID
import javax.security.auth.message.MessageInfo; //导入方法依赖的package包/类
/**
* Checks for the presence of
* {@value #JAVAX_SECURITY_AUTH_MESSAGE_MESSAGE_POLICY_IS_MANDATORY} in the
* map.
*
* @param messageInfo
* contains the message request, response and some system
* populated map.
* @return the string representation of the {@link MessageInfo} if it is
* mandatory, <code>null</code> otherwise.
*/
public String getAuthContextID(final MessageInfo messageInfo) {
final Object isMandatory = messageInfo.getMap()
.get(JAVAX_SECURITY_AUTH_MESSAGE_MESSAGE_POLICY_IS_MANDATORY);
if (isMandatory != null && isMandatory instanceof String && Boolean.valueOf((String) isMandatory)) {
return messageInfo.toString();
}
return null;
}