com.phoenix_int.aserver.library
Interface IPHXFactory


public interface IPHXFactory

A factory is a class that has the logic for turning a file on disk into a real component instance and for retrieving component meta data.


Method Summary
 PHXComponentDescription describe(java.io.File dir, java.lang.String compClass, java.lang.String virtualDir)
          describes the specified component.
 java.io.File getFileFor(java.io.File dir, java.lang.String compClass, java.lang.String virtualDir)
          Returns a File object which points to the file on disk which contains the implementation of this component
 IPHXComponent instantiate(java.io.File dir, java.lang.String compClass, java.lang.String virtualDir)
          creates an instance of the specified component.
 java.util.Collection listComponents(java.io.File dir, java.lang.String virtualDir)
           
 

Method Detail

listComponents

java.util.Collection listComponents(java.io.File dir,
                                    java.lang.String virtualDir)
Returns:
an array of class names

instantiate

IPHXComponent instantiate(java.io.File dir,
                          java.lang.String compClass,
                          java.lang.String virtualDir)
                          throws java.lang.ClassNotFoundException,
                                 java.lang.IllegalAccessException,
                                 java.lang.InstantiationException,
                                 java.lang.reflect.InvocationTargetException,
                                 PHXServerSideException,
                                 java.net.MalformedURLException,
                                 java.io.IOException,
                                 com.phoenix_int.aserver.util.proxywrapper.PHXProxyNotAllowedException
creates an instance of the specified component.

Returns:
an instance of the specified component class
Throws:
java.lang.ClassNotFoundException - if the specified class does not exist
java.lang.IllegalAccessException - the class can't be instantiated
java.lang.InstantiationException - the class can't be instantiated
java.lang.reflect.InvocationTargetException - if an exception occurs while intantiating the specified class.
PHXServerSideException
java.net.MalformedURLException
java.io.IOException
com.phoenix_int.aserver.util.proxywrapper.PHXProxyNotAllowedException

describe

PHXComponentDescription describe(java.io.File dir,
                                 java.lang.String compClass,
                                 java.lang.String virtualDir)
                                 throws java.lang.ClassNotFoundException,
                                        java.io.IOException,
                                        PHXServerSideException,
                                        java.net.MalformedURLException
describes the specified component.

Returns:
an instance of the specified component class
Throws:
java.lang.ClassNotFoundException - thrown if the class is not found
java.io.IOException
PHXServerSideException
java.net.MalformedURLException

getFileFor

java.io.File getFileFor(java.io.File dir,
                        java.lang.String compClass,
                        java.lang.String virtualDir)
                        throws java.lang.ClassNotFoundException,
                               java.io.IOException
Returns a File object which points to the file on disk which contains the implementation of this component

Throws:
java.lang.ClassNotFoundException
java.io.IOException