|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.maverick.ssh.components.ComponentFactory
A utility class used to store the available transport components and provide delimited listing as required in the key exchange initialization process.
| Field Summary | |
protected java.util.Vector |
order
|
protected java.util.Hashtable |
supported
The supported components stored in a Hashtable with a String key as the component name such as "3des-cbc" and a Class value storing the implementation class. |
| Constructor Summary | |
ComponentFactory(java.lang.Class type)
Create a component factory with the base class supplied. |
|
| Method Summary | |
void |
add(java.lang.String name,
java.lang.Class cls)
Add a new component type to the factory. |
java.lang.String |
changePositionofAlgorithm(java.lang.String name,
int position)
|
void |
clear()
Clear all of the entries in this component factory. |
java.lang.Object |
clone()
|
boolean |
contains(java.lang.String name)
Determine whether the factory supports a given component type. |
protected java.lang.Object |
createInstance(java.lang.String name,
java.lang.Class cls)
Override this method to create an instance of the component. |
java.lang.String |
createNewOrdering(int[] ordering)
|
java.lang.Object |
getInstance(java.lang.String name)
Get a new instance of a supported component. |
java.lang.String |
list(java.lang.String preferred)
List the types of components supported by this factory. |
void |
remove(java.lang.String name)
Remove a supported component |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Hashtable supported
protected java.util.Vector order
| Constructor Detail |
public ComponentFactory(java.lang.Class type)
type -
java.lang.ClassNotFoundException - Thrown if the class cannot
be resolved.| Method Detail |
public java.lang.String changePositionofAlgorithm(java.lang.String name,
int position)
throws SshException
SshException
public java.lang.String createNewOrdering(int[] ordering)
throws SshException
SshExceptionpublic boolean contains(java.lang.String name)
name -
true if the component is supported otherwise
falsepublic java.lang.String list(java.lang.String preferred)
preferred - The preferred component type.
public void add(java.lang.String name,
java.lang.Class cls)
name - cls -
java.lang.ClassNotFoundException
public java.lang.Object getInstance(java.lang.String name)
throws SshException
name - The name of the component; for example "3des-cbc"
java.lang.ClassNotFoundException
SshException
protected java.lang.Object createInstance(java.lang.String name,
java.lang.Class cls)
throws java.lang.Throwable
cls -
java.lang.Throwablepublic void remove(java.lang.String name)
name - public void clear()
public java.lang.Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||