Package com.sun.xml.ws.policy
Class PolicySubject
java.lang.Object
com.sun.xml.ws.policy.PolicySubject
A PolicySubject is an entity (e.g., a port, operation, binding,
service) with which a policy can be associated.
- Author:
- Fabian Ritzmann
-
Constructor Summary
ConstructorDescriptionPolicySubject
(Object subject, Policy policy) Constructs a policy subject instance.PolicySubject
(Object subject, Collection<Policy> policies) Constructs a policy subject instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Attaches another Policy instance to the policy subject.getEffectivePolicy
(PolicyMerger merger) Returns the effective policy of the subject, i.e.A unique identifier of the subject Subjects may not always be uniquely identifiable.toString()
AnObject.toString()
method override.
-
Constructor Details
-
PolicySubject
Constructs a policy subject instance.- Parameters:
subject
- object to which the policies are attached. Must not benull
.policy
- first policy attached to the subject. Must not benull
.- Throws:
IllegalArgumentException
- in case any of the arguments isnull
.
-
PolicySubject
Constructs a policy subject instance.- Parameters:
subject
- object to which the policies are attached. Must not benull
.policies
- first policy attached to the subject. Must not benull
.- Throws:
IllegalArgumentException
- in case any of the arguments isnull
or in casepolicies
argument represents empty collection.
-
-
Method Details
-
attach
Attaches another Policy instance to the policy subject.- Parameters:
policy
- new policy instance to be attached to this subject- Throws:
IllegalArgumentException
- in casepolicy
argument isnull
.
-
getEffectivePolicy
Returns the effective policy of the subject, i.e. all policies of the subject merged together.- Returns:
- effective policy of the subject
- Throws:
PolicyException
-
getSubject
A unique identifier of the subject Subjects may not always be uniquely identifiable. Also, once the subject is assigned to a scope, its identity may not matter anymore. Therefore this may be null. -
toString
AnObject.toString()
method override.
-