org.apache.cocoon.framework
Class Manager

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.apache.cocoon.framework.Manager

public class Manager
extends java.util.Hashtable
implements Actor, Factory, Director

This class is used to create and control software actors and resources.

Version:
$Revision: 1.8 $ $Date: 2000/03/17 16:49:44 $
Author:
Stefano Mazzocchi
See Also:
Serialized Form

Constructor Summary
Manager()
           
 
Method Summary
 java.lang.Object create(java.lang.String name)
          Create the instance of a class given its name.
 java.lang.Object create(java.lang.String name, Configurations conf)
          Create the instance of a class and, if configurable, use the given configurations to configure it.
 java.util.Vector create(java.util.Vector names)
          Create a vector of instances.
 java.util.Vector create(java.util.Vector names, Configurations conf)
          Create a vector of instances with given configurations.
 java.lang.Object getActor(java.lang.String role)
          Get the actor currently playing the given role.
 java.util.Enumeration getRoles()
          Get the roles currently set.
 void init(Director director)
          Initialize the actor by indicating their director.
 void setRole(java.lang.String role, java.lang.Object actor)
          Set the actor for the role.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Manager

public Manager()
Method Detail

init

public void init(Director director)
Initialize the actor by indicating their director.
Specified by:
init in interface Actor

create

public java.lang.Object create(java.lang.String name)
Create the instance of a class given its name.
Specified by:
create in interface Factory

create

public java.lang.Object create(java.lang.String name,
                               Configurations conf)
                        throws java.lang.RuntimeException
Create the instance of a class and, if configurable, use the given configurations to configure it.
Specified by:
create in interface Factory

create

public java.util.Vector create(java.util.Vector names)
Create a vector of instances.
Specified by:
create in interface Factory

create

public java.util.Vector create(java.util.Vector names,
                               Configurations conf)
Create a vector of instances with given configurations.
Specified by:
create in interface Factory

getActor

public java.lang.Object getActor(java.lang.String role)
Get the actor currently playing the given role.
Specified by:
getActor in interface Director

setRole

public void setRole(java.lang.String role,
                    java.lang.Object actor)
Set the actor for the role.
Specified by:
setRole in interface Director

getRoles

public java.util.Enumeration getRoles()
Get the roles currently set.
Specified by:
getRoles in interface Director


Copyright © 1999-2000 Apache Software Foundation. All Rights Reserved.