Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.combine
Class BaseCombiningAlgFactory  view BaseCombiningAlgFactory download BaseCombiningAlgFactory.java

java.lang.Object
  extended bycom.sun.xacml.combine.CombiningAlgFactory
      extended bycom.sun.xacml.combine.BaseCombiningAlgFactory
Direct Known Subclasses:
StandardCombiningAlgFactory

public class BaseCombiningAlgFactory
extends CombiningAlgFactory

This is a basic implementation of CombiningAlgFactory. It implements the insertion and retrieval methods, but doesn't actually setup the factory with any algorithms.

Note that while this class is thread-safe on all creation methods, it is not safe to add support for a new algorithm while creating an instance of an algorithm. This follows from the assumption that most people will initialize these factories up-front, and then start processing without ever modifying the factories. If you need these mutual operations to be thread-safe, then you should write a wrapper class that implements the right synchronization.

Since:
1.2

Field Summary
private  java.util.HashMap algMap
           
 
Fields inherited from class com.sun.xacml.combine.CombiningAlgFactory
 
Constructor Summary
BaseCombiningAlgFactory()
          Default constructor.
BaseCombiningAlgFactory(java.util.Set algorithms)
          Constructor that configures this factory with an initial set of supported algorithms.
 
Method Summary
 void addAlgorithm(CombiningAlgorithm alg)
          Adds a combining algorithm to the factory.
 CombiningAlgorithm createAlgorithm(java.net.URI algId)
          Tries to return the correct combinging algorithm based on the given algorithm ID.
 java.util.Set getSupportedAlgorithms()
          Returns the algorithm identifiers supported by this factory.
 
Methods inherited from class com.sun.xacml.combine.CombiningAlgFactory
addCombiningAlg, createCombiningAlg, getInstance, setDefaultFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

algMap

private java.util.HashMap algMap
Constructor Detail

BaseCombiningAlgFactory

public BaseCombiningAlgFactory()
Default constructor.


BaseCombiningAlgFactory

public BaseCombiningAlgFactory(java.util.Set algorithms)
Constructor that configures this factory with an initial set of supported algorithms.

Method Detail

addAlgorithm

public void addAlgorithm(CombiningAlgorithm alg)
Adds a combining algorithm to the factory. This single instance will be returned to anyone who asks the factory for an algorithm with the id given here.

Specified by:
addAlgorithm in class CombiningAlgFactory

getSupportedAlgorithms

public java.util.Set getSupportedAlgorithms()
Returns the algorithm identifiers supported by this factory.

Specified by:
getSupportedAlgorithms in class CombiningAlgFactory

createAlgorithm

public CombiningAlgorithm createAlgorithm(java.net.URI algId)
                                   throws com.sun.xacml.UnknownIdentifierException
Tries to return the correct combinging algorithm based on the given algorithm ID.

Specified by:
createAlgorithm in class CombiningAlgFactory