Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.net
Class CompositeActionPolicy

java.lang.Object
  extended by com.tangosol.net.CompositeActionPolicy

All Implemented Interfaces:
ActionPolicy

public class CompositeActionPolicy
extends java.lang.Object
implements ActionPolicy

CompositeActionPolicy represents the "intersection" of two policies. More formally, a given action is allowed iff both component policies allow it.

Author:
rhl 2012.09.20

Field Summary
protected  ActionPolicy f_policyPrimary
          The primary ActionPolicy.
protected  ActionPolicy f_policySecondary
          The secondary ActionPolicy.

 

Constructor Summary
CompositeActionPolicy(ActionPolicy policyPrimary, ActionPolicy policySecondary)
          Construct a CompositeActionPolicy representing the specified policies.

 

Method Summary
 ActionPolicy getPrimaryPolicy()
          Return the primary policy.
 ActionPolicy getSecondaryPolicy()
          Return the secondary policy.
 void init(Service service)
          Called when the specified service loads and configures this policy.
 boolean isAllowed(Service service, Action action)
          Evaluate if the specified action is currently allowed by this policy.

 

Methods inherited from interface com.tangosol.net.ActionPolicy
toString

 

Field Detail

f_policyPrimary

protected final ActionPolicy f_policyPrimary
The primary ActionPolicy.

f_policySecondary

protected final ActionPolicy f_policySecondary
The secondary ActionPolicy.

Constructor Detail

CompositeActionPolicy

public CompositeActionPolicy(ActionPolicy policyPrimary,
                             ActionPolicy policySecondary)
Construct a CompositeActionPolicy representing the specified policies.
Parameters:
policyPrimary - the first policy to consult
policySecondary - the second policy to consult

Method Detail

init

public void init(Service service)
Called when the specified service loads and configures this policy.

Note: A policy could be applied to multiple services.

Specified by:
init in interface ActionPolicy
Parameters:
service - the service that this policy applies to

isAllowed

public boolean isAllowed(Service service,
                         Action action)
Evaluate if the specified action is currently allowed by this policy.

Note: for forward compatibility, implementations should generally return true for actions that are not recognized.

Specified by:
isAllowed in interface ActionPolicy
Parameters:
service - the service that is performing the action
action - the action that is being performed
Returns:
true iff the specified action is currently allowed by this policy

getPrimaryPolicy

public ActionPolicy getPrimaryPolicy()
Return the primary policy.
Returns:
the primary policy

getSecondaryPolicy

public ActionPolicy getSecondaryPolicy()
Return the secondary policy.
Returns:
the secondary policy

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.