Interface IContainerFactory

    • Method Detail

      • addDescription

        ContainerTypeDescription addDescription​(ContainerTypeDescription containerTypeDescription)
        Add a ContainerTypeDescription to the set of known ContainerDescriptions.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to add to this factory. Must not be null.
        Returns:
        ContainerTypeDescription the old description of the same name, null if none found
      • getDescriptions

        List getDescriptions()
        Get a collection of the ContainerDescriptions currently known to this factory. This allows clients to query the factory to determine what if any other ContainerDescriptions are currently registered with the factory, and if so, what they are.
        Returns:
        List of ContainerTypeDescription instances
      • containsDescription

        boolean containsDescription​(ContainerTypeDescription containerTypeDescription)
        Check to see if a given named description is already contained by this factory
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to look for
        Returns:
        true if description is already known to factory, false otherwise
      • getDescriptionByName

        ContainerTypeDescription getDescriptionByName​(String containerTypeDescriptionName)
        Get the known ContainerTypeDescription given it's name.
        Parameters:
        containerTypeDescriptionName - the name to use as key to find ContainerTypeDescription. Must not be null.
        Returns:
        ContainerTypeDescription found. Null if not found.
      • removeDescription

        ContainerTypeDescription removeDescription​(ContainerTypeDescription containerTypeDescription)
        Remove given description from set known to this factory.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to remove
        Returns:
        the removed ContainerTypeDescription, null if nothing removed
      • getDescriptionsForContainerAdapter

        ContainerTypeDescription[] getDescriptionsForContainerAdapter​(Class containerAdapter)
        Get container type descriptions that support the given containerAdapter
        Parameters:
        containerAdapter - the container adapter. Must not be null.
        Returns:
        ContainerTypeDescription[] of descriptions that support the given container adapter. If no ContainerTypeDescriptions found that support the given adapter, an empty array will be returned.
      • createContainer

        IContainer createContainer​(ID containerID)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerID - the container's new ID. Must not be null.
        Returns:
        IContainer instance. A non-null. instance will be returned.
        Throws:
        ContainerCreateException - if some problem creating a base IContainer instance.
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        Returns:
        a valid instance of IContainer. Will not be null.
        Throws:
        ContainerCreateException - if cannot create container of given name
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   Object[] parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer. A non-null instance will be returned.
        Throws:
        ContainerCreateException - if some problem creating the instance.
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   Object[] parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        parameters - the Object [] of parameters passed to the IContainerInstantiator.createInstance method. May be null.
        Returns:
        a valid instance of IContainer. Will not be null.
        Throws:
        ContainerCreateException - if some problem creating the instance.
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   String containerId)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to use to create the instance. Must not be null.
        containerId - the container's new ID. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   String containerId,
                                   Object[] parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to use to create the instance. Must not be null.
        containerId - the container's new ID. May be null.
        parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   String containerId)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        containerId - the container's new ID. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   String containerId,
                                   Object[] parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        containerId - the container's new ID. May be null.
        parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   ID containerID,
                                   Object[] parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        containerID - the container's new ID. May be null.
        parameters - an Object [] of parameters passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   ID containerID,
                                   Object[] parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        containerID - the new container's id. May be null.
        parameters - the Object [] of parameters passed to the IContainerInstantiator.createInstance method. May be null.
        Returns:
        a valid instance of IContainer. Will not be null.
        Throws:
        ContainerCreateException - if some problem creating the instance.
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   ID containerID)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to lookup. Must not be null.
        containerID - the new container's id. May be null.
        Returns:
        a valid instance of IContainer. Will not be null.
        Throws:
        ContainerCreateException - if some problem creating the instance.
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   ID containerID)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        containerID - the new container's id. May be null.
        Returns:
        a valid instance of IContainer. Will not be null.
        Throws:
        ContainerCreateException - if some problem creating the instance.
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   ID containerID,
                                   Map parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        containerID - the container's new ID. Must not be null.
        parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   String containerId,
                                   Map parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        containerId - the container's new ID. May be null.
        parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   ID containerID,
                                   Map parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        containerID - the container's new ID. May be null.
        parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   String containerId,
                                   Map parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        containerId - the container's new ID. May be null.
        parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(ContainerTypeDescription containerTypeDescription,
                                   Map parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescription - the ContainerTypeDescription to use to create the instance. Must not be null.
        parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1
      • createContainer

        IContainer createContainer​(String containerTypeDescriptionName,
                                   Map parameters)
                            throws ContainerCreateException
        Create a new container.
        Parameters:
        containerTypeDescriptionName - the ContainerTypeDescription name to lookup. Must not be null.
        parameters - a Map of parameters (name/value pairs) passed to the createInstance method of the IContainerInstantiator. May be null.
        Returns:
        a valid instance of IContainer
        Throws:
        ContainerCreateException - if some problem creating the instance.
        Since:
        3.1