|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.systinet.wasp.policy.PolicyManager
Policy Manager represents powerful part of the policy framework.
It provides support for:
PolicyAttachment
Policy
EffectivePolicy
Policy policy = PolicyManager.createPolicy(); InactivityTimeoutAssertion assertion = new InactivityTimeoutAssertion(5000); assertion.setPreference(100); policy.add(assertion); PolicyManager.createPolicyAttachment(new EndpointReference("http://localhost:6060/demo/basic/HelloService"), policy);
Policy
,
PolicyAttachment
,
EffectivePolicy
,
DomainExpression
Method Summary | |
static PolicyAttachment |
attachPolicy(DomainExpression domainExpression,
Policy policy)
Creates an instance of PolicyAttachment , which attaches given Policy to given
DomainExpression . |
static Policy |
createPolicy()
Creates an instance Policy . |
static Policy |
createPolicy(QName name)
Creates an instance of Policy with given qualified name (Name, TargetNamespace) attributes. |
static PolicyAttachment |
createPolicyAttachment(DomainExpression domainExpression,
Policy policy)
Creates an instance of PolicyAttachment , which attaches given Policy to given
DomainExpression . |
static PolicyAttachment |
createPolicyAttachment(DomainExpression domainExpression,
Policy[] policies)
Creates an instance of PolicyAttachment , which attaches given array of Policy s to given
DomainExpression . |
static EffectivePolicy |
getEffectivePolicy(DomainExpression domainExpression)
Gets the EffectivePolicy for given DomainExpression . |
static Policy[] |
getPolices()
Gets all Policy s registered in policy manager. |
static Policy |
getPolicy(QName name)
Gets the Policy of given qualified name or null
if doesn't exist. |
static PolicyAttachment |
getPolicyAttachment(DomainExpression domainExpression)
Gets the PolicyAttachment indetifies by given {DomainExpression or
null if any doesn't exist. |
static PolicyAttachment[] |
getPolicyAttachments()
Gets all PolicyAttachment s registered in policy manager. |
static Policy |
loadPolicy(javax.xml.transform.Source source)
Loads Policy from given Source . |
static PolicyAttachment[] |
loadPolicyAttachment(javax.xml.transform.Source source)
Loads PolicyAttachment s from given Source . |
static void |
removePolicy(Policy policy)
Removes given Policy from policy manager. |
static void |
removePolicyAttachment(PolicyAttachment policyAttachment)
Removes given PolicyAttachment from policy manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static PolicyAttachment createPolicyAttachment(DomainExpression domainExpression, Policy[] policies) throws PolicyException
PolicyAttachment
, which attaches given array of Policy
s to given
DomainExpression
. When a policy attachment already exists to given domain expression
PolicyException is thrown.
domainExpression
- domain expression specified the scope of attachmentpolicies
- array of policies to attach
PolicyException
- when an error occurs during creatingpublic static PolicyAttachment createPolicyAttachment(DomainExpression domainExpression, Policy policy) throws PolicyException
PolicyAttachment
, which attaches given Policy
to given
DomainExpression
. When a policy attachment already exists to given domain expression
PolicyException is thrown.
domainExpression
- domain expression specified the scope of attachmentpolicy
- policy to attach
PolicyException
- when an error occurs during creatingpublic static PolicyAttachment attachPolicy(DomainExpression domainExpression, Policy policy)
PolicyAttachment
, which attaches given Policy
to given
DomainExpression
. When a policy attachment already exists to given domain expression
the policy is added to this instance and this isntance is returned.
domainExpression
- domain expression specified the scope of attachmentpolicy
- policy to attach
public static PolicyAttachment getPolicyAttachment(DomainExpression domainExpression)
PolicyAttachment
indetifies by given {DomainExpression
or
null
if any doesn't exist.
domainExpression
- domain expresion to get policy attachment
null
if any doesn't exist.public static PolicyAttachment[] getPolicyAttachments()
PolicyAttachment
s registered in policy manager.
public static void removePolicyAttachment(PolicyAttachment policyAttachment)
PolicyAttachment
from policy manager.
policyAttachment
- policy attachment to removepublic static PolicyAttachment[] loadPolicyAttachment(javax.xml.transform.Source source) throws PolicyException
PolicyAttachment
s from given Source
.
Because of source can contain more then one domain expression, an array is returned.
source
- source to load
PolicyException
- when an error occurs during loadingpublic static Policy createPolicy()
Policy
.
Policy
public static Policy createPolicy(QName name) throws PolicyException
Policy
with given qualified name (Name, TargetNamespace) attributes.
If the policy with given name already exists, PolicyException is thrown.
name
- qualified name of policy to create
PolicyException
- when when an error occurs during creatingpublic static Policy getPolicy(QName name)
Policy
of given qualified name or null
if doesn't exist.
name
- qualified name of policy to get
null
if doesn't existpublic static Policy[] getPolices()
Policy
s registered in policy manager.
public static void removePolicy(Policy policy)
Policy
from policy manager.
policy
- policy to removepublic static Policy loadPolicy(javax.xml.transform.Source source) throws PolicyException
Policy
from given Source
.
source
- source to load
PolicyException
- when an error occurs during loadingpublic static EffectivePolicy getEffectivePolicy(DomainExpression domainExpression)
EffectivePolicy
for given DomainExpression
.
domainExpression
- domain expression, for which eefective policy is get
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |