Class: PHXLibrarianCombiner
Last update: 16.07.2025Package: com.phoenix_int.aserver.library
Class Hierarchy
↳ java.lang.Object
↳ com.phoenix_int.aserver.library.PHXLibrarianCombiner
Implemented Interfaces
IPHXLibrarian,IPHXLibrarian2,IPHXVersionedLibrarian,IPHXVersionedLibrarian2,IPHXVersionedLibrarian3
Declaration
public class PHXLibrarianCombiner
extends java.lang.Object
implements com.phoenix_int.aserver.library.IPHXVersionedLibrarian3
This class combines several sub-librarians, adding dir lists and component lists together. If there is a conflict in component or directory name, the first librarian wins out, and no error is given.
Constructor Summary
| Constructor and Description |
|---|
PHXLibrarianCombiner() |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
void |
addLibrarian(IPHXLibrarian l)Adds a librarian to our list |
void |
cleanUp()Recursively tells kids to clean themselves up |
PHXComponentDescription |
describe(java.lang.String compClass, java.lang.String virtualDir)Describes the specified component. |
java.lang.String |
getBranchesAndTags()Fetches a list of all branches and tags |
PHXComponentBranch |
getComponentHistory(java.lang.String compClass, java.lang.String virtualDir)Gets all version information about a particular component |
java.lang.String |
getQueues(java.lang.String compClass, java.lang.String virtualDir)Get the queues for the specified component. |
void |
initialize(com.phoenix_int.aserver.ascore.PHXConnection connection, IPHXFactory factories, com.phoenix_int.aserver.ascore.PHXAServerArgs args, org.w3c.dom.Node xmlOptions)The XML initialization information for this class is simply a list of |
IPHXComponent |
instantiate(java.lang.String compClass, java.lang.String virtualDir)Creates an instance of the specified component. |
IPHXComponent |
instantiate(java.lang.String compClass, java.lang.String virtualDir, java.lang.String connector, java.lang.String queue) |
PHXComponentResourcePair |
instantiateManaged(java.lang.String compClass, java.lang.String virtualDir)Creates an instance of the specified component. |
PHXComponentResourcePair |
instantiateManaged(java.lang.String compClass, java.lang.String virtualDir, java.lang.String connector, java.lang.String queue)Creates an instance of the specified component. |
java.util.Collection |
listComponents(java.lang.String virtualDir)Returns the components in a specific directory |
java.util.Collection |
listDirectories(java.lang.String virtualDir)Returns sub-directories from a specified directory |
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
PHXLibrarianCombiner
public PHXLibrarianCombiner()
Method Detail
addLibrarian
public void addLibrarian(IPHXLibrarian l)
Adds a librarian to our list
initialize
public void initialize(com.phoenix_int.aserver.ascore.PHXConnection connection,
IPHXFactory factories,
com.phoenix_int.aserver.ascore.PHXAServerArgs args,
org.w3c.dom.Node xmlOptions)
throws java.lang.Exception
The XML initialization information for this class is simply a list of <librarian> tags which contain <librarianclass> and <librarianoptions> tags inside.
Example:
<librarianoptions>
<librarian>
<librarianclass>com.phoenix_int.aserver.library.PHXDirectoryLibrarian</librarianclass>
<librarianoptions> ... </librarianoptions>
</librarian>
<librarian>
....
</librarian>
</librarianoptions>
Specified By:
initializein interfaceIPHXLibrarian
Throws:
java.lang.Exception
cleanUp
public void cleanUp()
Recursively tells kids to clean themselves up
Specified By:
cleanUpin interfaceIPHXLibrarian
listComponents
public java.util.Collection listComponents(java.lang.String virtualDir)
throws PHXNoSuchCategoryException,
com.phoenix_int.aserver.security.PHXAccessDeniedException
Returns the components in a specific directory
Specified By:
listComponentsin interfaceIPHXLibrarian
Parameters:
virtualDir- The directory the client asked for
Returns:
- An array of class names
Throws:
com.phoenix_int.aserver.security.PHXAccessDeniedException- if the directory could not be scannedPHXNoSuchCategoryException
listDirectories
public java.util.Collection listDirectories(java.lang.String virtualDir)
throws PHXNoSuchCategoryException,
com.phoenix_int.aserver.security.PHXAccessDeniedException
Returns sub-directories from a specified directory
Specified By:
listDirectoriesin interfaceIPHXLibrarian
Parameters:
virtualDir- The directory the client asked for
Returns:
- A Collection of Strings
Throws:
PHXNoSuchCategoryExceptioncom.phoenix_int.aserver.security.PHXAccessDeniedException
instantiate
public IPHXComponent instantiate(java.lang.String compClass,
java.lang.String virtualDir)
throws java.lang.Exception
Creates an instance of the specified component.
Specified By:
instantiatein interfaceIPHXLibrarian
Parameters:
compClass- The class name for the componentvirtualDir- The directory to search for the component class
Returns:
- An instance of the associated component class with the file loaded
Throws:
java.lang.ClassNotFoundException- if the class is not foundjava.lang.IllegalAccessException- cannot call constructorjava.lang.InstantiationException- cannot call constructorjava.lang.reflect.InvocationTargetException- if an exception if the specified component exists, but is not of the right type, or if an exception occurs while creating the class or loading the setup filePHXNoSuchCategoryException- If thevirtualDirNamepassed in is invalidjava.lang.Exception- If anything serious goes wrong
instantiate (overload)
public IPHXComponent instantiate(java.lang.String compClass,
java.lang.String virtualDir,
java.lang.String connector,
java.lang.String queue)
throws java.lang.Exception
Specified By:
instantiatein interfaceIPHXLibrarian
Throws:
java.lang.Exception
instantiateManaged
public com.phoenix_int.aserver.PHXComponentResourcePair instantiateManaged(java.lang.String compClass,
java.lang.String virtualDir)
throws java.lang.Exception
Creates an instance of the specified component. Typically a librarian will find the appropriate files and pass the request off to the IPHXFactory.
It is important that this class throws PHXNoSuchCategoryException and ClassNotFoundException in the appropriate cases as they are handled in special ways by the librarian mounter and librarian combiner.
Specified By:
instantiateManagedin interfaceIPHXLibrarian2
Parameters:
compClass- The class name for the componentvirtualDir- The directory the client asked for
Returns:
- An instance of the specified component class and its managed resources (
PHXComponentResourcePair)
Throws:
PHXNoSuchCategoryException- If thevirtualDirNamepassed in is invalidjava.lang.ClassNotFoundException- IfcompClassdoesn't indicate a valid class for the specified directoryjava.lang.Exception- If anything serious goes wrong
instantiateManaged (overload)
public com.phoenix_int.aserver.PHXComponentResourcePair instantiateManaged(java.lang.String compClass,
java.lang.String virtualDir,
java.lang.String connector,
java.lang.String queue)
throws java.lang.Exception
Creates an instance of the specified component. Typically a librarian will find the appropriate files and pass the request off to the IPHXFactory.
It is important that this class throws PHXNoSuchCategoryException and ClassNotFoundException in the appropriate cases as they are handled in special ways by the librarian mounter and librarian combiner.
Specified By:
instantiateManagedin interfaceIPHXLibrarian2
Parameters:
compClass- The class name for the componentvirtualDir- The directory the client asked forconnector- Name of the connector object to usequeue- Name of the queue object to use
Returns:
- An instance of the specified component class and its managed resources (
PHXComponentResourcePair)
Throws:
PHXNoSuchCategoryException- If thevirtualDirNamepassed in is invalidjava.lang.ClassNotFoundException- IfcompClassdoesn't indicate a valid class for the specified directoryjava.lang.Exception- If anything serious goes wrong
describe
public PHXComponentDescription describe(java.lang.String compClass,
java.lang.String virtualDir)
throws java.lang.Exception
Describes the specified component.
Specified By:
describein interfaceIPHXLibrarian
Parameters:
compClass- The class name for the componentvirtualDir- The directory the client asked for
Returns:
- A description of the specified component class (
PHXComponentDescription)
Throws:
java.lang.ClassNotFoundException- if the class is not foundPHXNoSuchCategoryException- If thevirtualDirNamepassed in is invalidjava.lang.Exception- If anything goes wrong
getQueues
public java.lang.String getQueues(java.lang.String compClass,
java.lang.String virtualDir)
throws java.lang.Exception
Get the queues for the specified component.
Specified By:
getQueuesin interfaceIPHXLibrarian
Parameters:
compClass- The class name for the componentvirtualDir- The directory the client asked for
Returns:
- A list of queues of the specified component class
Throws:
java.lang.ClassNotFoundException- if the class is not foundPHXNoSuchCategoryException- If thevirtualDirNamepassed in is invalidjava.lang.Exception- If anything goes wrong
getComponentHistory
public PHXComponentBranch getComponentHistory(java.lang.String compClass,
java.lang.String virtualDir)
throws java.lang.Exception
Gets all version information about a particular component.
Specified By:
getComponentHistoryin interfaceIPHXVersionedLibrarian
Parameters:
compClass- The class name for the componentvirtualDir- The directory the client asked for
Returns:
- An instance of
PHXComponentBranchwhich contains all the versions and sub-branches available
Throws:
PHXNoSuchCategoryException- If thevirtualDirNamepassed in is invalidjava.lang.ClassNotFoundException- IfcompClassdoesn't indicate a valid class for the specified directoryjava.lang.Exception- If anything goes wrong
getBranchesAndTags
public java.lang.String getBranchesAndTags()
throws java.lang.Exception
Fetches a list of all branches and tags.
Specified By:
getBranchesAndTagsin interfaceIPHXVersionedLibrarian2
Throws:
java.lang.Exception- If anything goes wrong