com.continuent.tungsten.manager.resource.physical
Class ResourceFactory

java.lang.Object
  extended by com.continuent.tungsten.manager.resource.physical.ResourceFactory

public class ResourceFactory
extends java.lang.Object


Constructor Summary
ResourceFactory()
           
 
Method Summary
static ResourceNode addInstance(ResourceType type, java.lang.String key, ResourceNode parent, Directory directory, java.lang.String sessionID)
           
static
<T> ResourceNode
addQueue(java.lang.String key, ResourceNode parent, T type, Directory directory)
           
static Resource copyInstance(ResourceNode source, java.lang.String destinationKey, ResourceNode destination, Directory directory)
          Makes a copy of the source RouterResource and returns it with the new key set.
static Resource createInstance(java.lang.String sessionID, ResourceType type, java.lang.String key, ResourceNode parent, Directory directory)
          Creates a new resource instance of the specified type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFactory

public ResourceFactory()
Method Detail

addInstance

public static ResourceNode addInstance(ResourceType type,
                                       java.lang.String key,
                                       ResourceNode parent,
                                       Directory directory,
                                       java.lang.String sessionID)
                                throws ResourceException
Parameters:
type -
key -
parent -
directory -
sessionID -
Returns:
the node created/added
Throws:
ResourceException

copyInstance

public static Resource copyInstance(ResourceNode source,
                                    java.lang.String destinationKey,
                                    ResourceNode destination,
                                    Directory directory)
                             throws ResourceException
Makes a copy of the source RouterResource and returns it with the new key set.

Parameters:
source -
destinationKey -
destination -
directory -
Returns:
a copy of the resource
Throws:
ResourceException

createInstance

public static Resource createInstance(java.lang.String sessionID,
                                      ResourceType type,
                                      java.lang.String key,
                                      ResourceNode parent,
                                      Directory directory)
                               throws ResourceException
Creates a new resource instance of the specified type

Parameters:
sessionID -
type -
key -
parent -
directory -
Returns:
the instance created
Throws:
ResourceException

addQueue

public static <T> ResourceNode addQueue(java.lang.String key,
                                        ResourceNode parent,
                                        T type,
                                        Directory directory)
                             throws ResourceException
Throws:
ResourceException