net.sf.container
Interface ContainerFactory

All Known Implementing Classes:
AbstractPolicyFactory, CertificateAuthorityFactory, CodebaseFactory

public interface ContainerFactory

Container factories provide with interfaces to instantiate Container.

Factories are providing with a set of container policies based on some criteria, in a similar to java.security.Policy way.

Actual policy algorithm is a subject to the particular factory implementation. created on Jun 9, 2005

Since:
Version:
$Revision: 1.1 $
Author:
fiykov
See Also:
CodebaseFactory, CertificateAuthorityFactory

Method Summary
 Container newContainer(java.lang.Object permissionsCriteria)
          create new container based on given permission set criteria permission set criteria is implementation specific.
 void setPolicies(java.net.URL policyFile)
          set policies to be used by this factory while creating containers it uses a default policy file parser.
 void setPolicies(java.net.URL policyFile, PolicyParser parser)
          set policies to be used by this factory while creating containers
 

Method Detail

setPolicies

void setPolicies(java.net.URL policyFile)
                 throws java.io.FileNotFoundException,
                        PolicyParseException,
                        java.io.IOException
set policies to be used by this factory while creating containers

it uses a default policy file parser.

Parameters:
policyFile - with all permission sets
Throws:
java.io.FileNotFoundException - in case the resource does not exists
PolicyParseException - if the fail format is not recognized by the parser
java.io.IOException - in case of error while reading

setPolicies

void setPolicies(java.net.URL policyFile,
                 PolicyParser parser)
                 throws java.io.FileNotFoundException,
                        PolicyParseException,
                        java.io.IOException
set policies to be used by this factory while creating containers

Parameters:
policyFile - with all permission sets
parser - to use to parse the policyFile
Throws:
java.io.FileNotFoundException - in case the resource does not exists
PolicyParseException - if the fail format is not recognized by the parser
java.io.IOException - in case of error while reading

newContainer

Container newContainer(java.lang.Object permissionsCriteria)
create new container based on given permission set criteria

permission set criteria is implementation specific.

Parameters:
permissionsCriteria - to be used for that container. The object type of permissionsCriteria depends on the particular ContainerFactory implementation.
Returns:
a new Container instance


Copyright © 2007 Nikolay Fiykov. All Rights Reserved.