Package com.sun.xml.wss.impl.callback
Class DynamicPolicyCallback
java.lang.Object
com.sun.xml.wss.impl.callback.XWSSCallback
com.sun.xml.wss.impl.callback.DynamicPolicyCallback
- All Implemented Interfaces:
Callback
Callback implementation for dynamic policy resolution.
A DynamicPolicy Callback is made by the XWS-runtime to
allow the application/Handler to decide the incoming/outgoing
SecurityPolicy at runtime.
When the SecurityPolicy set on the Callback is a DynamicSecurityPolicy then the CallbackHandler is currently expected to set a com.sun.xml.wss.impl.configuration.MessagePolicy instance as the resolved policy. The MessagePolicy instance can contain policies generated by the PolicyGenerator obtained from the DynamicSecurityPolicy.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicPolicyCallback(SecurityPolicy _policy, DynamicPolicyContext _ctx) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionThe SecurityPolicy set by the invocation of the CallbackHandler.booleanvoidsetSecurityPolicy(SecurityPolicy _policy) set the resolved SecurityPolicy in response to this callbackMethods inherited from class com.sun.xml.wss.impl.callback.XWSSCallback
getRuntimeProperties
-
Constructor Details
-
DynamicPolicyCallback
public DynamicPolicyCallback(SecurityPolicy _policy, DynamicPolicyContext _ctx) throws PolicyGenerationException Constructor.Associate a DynamicSecurityPolicy or WSSPolicy instance. A DynamicSecurityPolicy can be used to obtain a PolicyGenerator. The DynamicPolicyContext passed can be used by the handler to dynamically decide the policy based on information in the context.
- Parameters:
_policy- DynamicSecurityPolicy or WSSPolicy_ctx- DynamicPolicyContext the context which provides context information to the Handler.- Throws:
PolicyGenerationException- See Also:
-
-
Method Details
-
getSecurityPolicy
The SecurityPolicy set by the invocation of the CallbackHandler.- Returns:
- SecurityPolicy
-
getDynamicContext
- Returns:
- DynamicPolicyContext passed to the callback
-
getStaticContext
- Returns:
- the StaticPolicyContext if any associated with the DynamicPolicyContext
-
setSecurityPolicy
set the resolved SecurityPolicy in response to this callback- Parameters:
_policy- a MessagePolicy instance containing SecurityPolicy generated by PolicyGenerator or a mutable WSSPolicy
-
isDynamicSecurityPolicy
public boolean isDynamicSecurityPolicy()
-