public class PolicyRegistryImpl extends Object implements PolicyRegistry
Constructor and Description |
---|
PolicyRegistryImpl() |
PolicyRegistryImpl(PolicyRegistry parent)
Constructs a PolicyRegistryImpl with the specified PolicyRegistry
as it's parent.
|
Modifier and Type | Method and Description |
---|---|
PolicyRegistry |
getParent() |
Policy |
lookup(String key)
Returns the Policy that the specified key is mapped.
|
void |
register(String key,
Policy policy)
Associates a key with a Policy
|
void |
remove(String key)
Removes the mapping for this key if present.
|
void |
setParent(PolicyRegistry parent) |
public PolicyRegistryImpl()
public PolicyRegistryImpl(PolicyRegistry parent)
parent
- the Parent of this PolicyRegistrypublic Policy lookup(String key)
PolicyRegistry
lookup
in interface PolicyRegistry
key
- the key whose associated Policy is to be returned.public void register(String key, Policy policy)
PolicyRegistry
register
in interface PolicyRegistry
key
- the key that the specified Policy to be associatedpolicy
- the policy to be associated with the keypublic void remove(String key)
PolicyRegistry
remove
in interface PolicyRegistry
key
- the key whose mapping is to be removedpublic void setParent(PolicyRegistry parent)
public PolicyRegistry getParent()
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.