public class PolicyContextImpl extends Object implements IPolicyContext
IPolicyContext.| Constructor and Description |
|---|
PolicyContextImpl(IComponentRegistry componentRegistry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAttribute(String name,
T defaultValue)
Fetches an attribute value from the conversation.
|
<T extends IComponent> |
getComponent(Class<T> componentClass)
Gets a component by type.
|
boolean |
removeAttribute(String name)
Removes an attribute from the conversation.
|
void |
setAttribute(String name,
Object value)
Sets a conversation-scoped attribute, allowing policies to pass interesting
information to each other and to themselves.
|
public PolicyContextImpl(IComponentRegistry componentRegistry)
componentRegistry - public void setAttribute(String name, Object value)
IPolicyContextsetAttribute in interface IPolicyContextIPolicyContext.setAttribute(java.lang.String, java.lang.Object)public <T> T getAttribute(String name, T defaultValue)
IPolicyContextgetAttribute in interface IPolicyContextIPolicyContext.getAttribute(java.lang.String, java.lang.Object)public boolean removeAttribute(String name)
IPolicyContextremoveAttribute in interface IPolicyContextIPolicyContext.removeAttribute(java.lang.String)public <T extends IComponent> T getComponent(Class<T> componentClass) throws io.apiman.gateway.engine.beans.exceptions.ComponentNotFoundException
IPolicyContextgetComponent in interface IPolicyContextio.apiman.gateway.engine.beans.exceptions.ComponentNotFoundExceptionIPolicyContext.getComponent(java.lang.Class)Copyright © 2014 JBoss, a division of Red Hat. All rights reserved.