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.
|
IConnectorInterceptor |
getConnectorInterceptor() |
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.
|
void |
setConnectorInterceptor(IConnectorInterceptor connectorInterceptor)
Sets the
IConnectorInterceptor to be used instead of the real connection. |
public PolicyContextImpl(IComponentRegistry componentRegistry)
componentRegistry - the component registrypublic 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)public void setConnectorInterceptor(IConnectorInterceptor connectorInterceptor) throws io.apiman.gateway.engine.beans.exceptions.InterceptorAlreadyRegisteredException
IPolicyContextIConnectorInterceptor to be used instead of the real connection.setConnectorInterceptor in interface IPolicyContextconnectorInterceptor - the connector interceptorio.apiman.gateway.engine.beans.exceptions.InterceptorAlreadyRegisteredExceptionIPolicyContext.setConnectorInterceptor(IConnectorInterceptor)public IConnectorInterceptor getConnectorInterceptor()
getConnectorInterceptor in interface IPolicyContextIConnectorInterceptor set to the context or null otherwiseIPolicyContext.getConnectorInterceptor()Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.