com.phoenix_int.aserver.library
Declaration
IPHXFactory2, as this class has methods that can leak resources.
Method Summary
Method Detail
listComponents
dir- a directory to search for componentsvirtualDir- the virtual directory to search
- an array of “class” names. For non-jar factories, this just means any sub-file identifier. Because a file can have multiple components (at least jars can) this text is used to identify them. This text is later fed back to this API via the other three methods in this interface. So really it just was a list of text that identify sub-components inside a single file. Even though this is generic and not enforced by the compiler only lists of strings should be used.
instantiate
IPHXFactory2.instantiateManaged(java.io.File, java.lang.String, java.lang.String) as this method can lead to resource leaks. Creates an instance of the specified component.
Parameters:
dir- a directory to search for componentscompClass- the component class identifiervirtualDir- the virtual directory
- an instance of the specified component class
java.lang.ClassNotFoundException- if the specified class does not existjava.lang.IllegalAccessException- the class can’t be instantiatedjava.lang.InstantiationException- the class can’t be instantiatedjava.lang.reflect.InvocationTargetException- if an exception occurs while instantiating the specified classPHXServerSideExceptionjava.net.MalformedURLExceptionjava.io.IOExceptioncom.phoenix_int.aserver.util.proxywrapper.PHXProxyNotAllowedException
describe
ClassNotFoundException if unable to handle/parse the given file.
Much of the documentation was added to this class retroactively and may make assumptions or have other unknown limitations.
Parameters:
dir- the path on disk to the file to be describedcompClass- This is the same “class” string that was returned by thelistComponentsmethod. This usually is not a class name, but it was originally but expanded beyond that — it seems now just to be the identifier that exceeds the file name (like a file that implements multiple components).virtualDir- the virtual directory
- an instance of the specified component class
java.lang.ClassNotFoundException- thrown if the class is not found, or the given factory is not able to handle this file. Callers of this method often expect this exception if the factory cannot handle the given file/compClass(id).java.io.IOExceptionPHXServerSideExceptionjava.net.MalformedURLException
getFileFor
dir- the directory containing the componentcompClass- the component class identifiervirtualDir- the virtual directory
- a File object pointing to the implementation file
java.lang.ClassNotFoundExceptionjava.io.IOException