|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanet.generic.commonapi.factory.NodeHandleFactoryImpl
public class NodeHandleFactoryImpl
This is a specific implementation of NodeHandleFactory that permits build any class of NodeHandle with any type of Id. It is possible by identifies this parameter in properties file:
Constructor Summary | |
---|---|
NodeHandleFactoryImpl(java.lang.Class nodeHandleClass)
Initializes a new instance of NodeHandleFactory with the nodeHandleClass specified by parameter. |
|
NodeHandleFactoryImpl(java.lang.String propertiesFile)
This constructor reads the properties' file and initializes the Class for new NodeHandles. |
Method Summary | |
---|---|
NodeHandle |
buildNodeHandle(Id id,
boolean alive)
Builds a NodeHandle with the actual implementation class of NodeHandle and specifieds id and alive flag. |
java.lang.Class |
getNodeHandleClass()
Gets the actual class of implementation of NodeHandle returned by this factory. |
void |
setNodeHandleClass(java.lang.Class nodeHandleClass)
Sets the class of an implementation of NodeHandle to return by this factory in the future. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeHandleFactoryImpl(java.lang.String propertiesFile) throws InitializationException
propertiesFile
- File of properties with the DEFAULT_NODEHANDLECLASS
property.
InitializationException
- If occur any problem during
initialization steps.public NodeHandleFactoryImpl(java.lang.Class nodeHandleClass) throws InitializationException
nodeHandleClass
- Class for new NodeHandles.
InitializationException
- If exists any problem with
initialization of class.Id
Method Detail |
---|
public NodeHandle buildNodeHandle(Id id, boolean alive) throws InitializationException
buildNodeHandle
in interface NodeHandleFactory
id
- Id of the related Node, to assign to the new instance of NodeNandle.alive
- true if the related Node is alive. false in other case.
InitializationException
NodeHandleFactory.buildNodeHandle(planet.commonapi.Id, boolean)
,
Id
public java.lang.Class getNodeHandleClass()
getNodeHandleClass
in interface NodeHandleFactory
NodeHandleFactory.getNodeHandleClass()
public void setNodeHandleClass(java.lang.Class nodeHandleClass) throws InitializationException
setNodeHandleClass
in interface NodeHandleFactory
nodeHandleClass
- Class of an implementation of NodeHandle to return by
this factory.
InitializationException
NodeHandleFactory.setNodeHandleClass(java.lang.Class)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |