planet.commonapi.factory
Interface NodeHandleFactory

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
NodeHandleFactoryImpl

public interface NodeHandleFactory
extends java.io.Serializable

It's a factory for NodeHandles abstraction. It pretends build NodeHandles of any class. It has got no parameters. Theese two parameters are fixed by properties file or by use of the NodeHandleFactory's methods. In the properties file exists the following parameter's names:

IMPORTANT: The concrete implementation of NodeHandle must have one constructor:
  1. The constructor with the related Node Id in its first parameter, and a boolean to show if the Node is alive, at the sencod argument.
    1. Author:
      Jordi Pujol
      See Also:
      NodeHandle

      Method Summary
       NodeHandle buildNodeHandle(Id nodeId, boolean alive)
                Builds a NodeHandle using the default NodeHandle class.
       java.lang.Class getNodeHandleClass()
                Gets Class for the generated NodeHandles.
       void setNodeHandleClass(java.lang.Class nodeHandleClass)
                Sets Class to generate new NodeHandles.
       

      Method Detail

      buildNodeHandle

      public NodeHandle buildNodeHandle(Id nodeId,
                                        boolean alive)
                                 throws InitializationException
      Builds a NodeHandle using the default NodeHandle class.

      Returns:
      A new instance of the default NodeHandle.
      Throws:
      InitializationException

      getNodeHandleClass

      public java.lang.Class getNodeHandleClass()
      Gets Class for the generated NodeHandles.

      Returns:
      Class for the generated NodeHandles.

      setNodeHandleClass

      public void setNodeHandleClass(java.lang.Class nodeHandleClass)
                              throws InitializationException
      Sets Class to generate new NodeHandles.

      Throws:
      InitializationException