- java.lang.Object
-
- javax.security.auth.message.MessagePolicy.TargetPolicy
-
- Enclosing class:
- MessagePolicy
public static class MessagePolicy.TargetPolicy extends Object
This class defines the message protection policies for specific Targets.This class is used to associate a message protection policy with targets within a message. Message targets are represented using an implementation of the Target interface matched to the message types in MessageInfo. The message protection policy is identified by an implementation of the ProtectionPolicy interface.
- See Also:
ClientAuthModule
,ServerAuthModule
-
-
Constructor Summary
Constructors Constructor and Description TargetPolicy(MessagePolicy.Target[] targets, MessagePolicy.ProtectionPolicy protectionPolicy)
Create a TargetPolicy instance with an array of Targets and with a ProtectionPolicy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MessagePolicy.ProtectionPolicy
getProtectionPolicy()
Get the ProtectionPolicy that applies to the targets.MessagePolicy.Target[]
getTargets()
Get the array of layer-specific target descriptors that identify the one or more message parts to which the specified message protection policy applies.
-
-
-
Constructor Detail
-
TargetPolicy
public TargetPolicy(MessagePolicy.Target[] targets, MessagePolicy.ProtectionPolicy protectionPolicy)
Create a TargetPolicy instance with an array of Targets and with a ProtectionPolicy.- Parameters:
targets
- An array of Targets. This argument may be null.protectionPolicy
- The object that describes the message authentication policy that applies to the targets.- Throws:
IllegalArgumentException
- if the specified targets or protectionPolicy is null.
-
-
Method Detail
-
getTargets
public MessagePolicy.Target[] getTargets()
Get the array of layer-specific target descriptors that identify the one or more message parts to which the specified message protection policy applies.- Returns:
- An array of Target that identify targets within a message. This method returns null when the specified policy applies to the whole message (excluding any metadata added to the message to satisfy the policy). This method never returns a zero-length array.
-
getProtectionPolicy
public MessagePolicy.ProtectionPolicy getProtectionPolicy()
Get the ProtectionPolicy that applies to the targets.- Returns:
- A ProtectionPolicy object that identifies the message authentication requirements that apply to the targets.
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/security/auth/message/MessagePolicy.TargetPolicy.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.