planet.generic.commonapi.factory
Class EndPointFactoryImpl

java.lang.Object
  extended byplanet.generic.commonapi.factory.EndPointFactoryImpl
All Implemented Interfaces:
EndPointFactory

public class EndPointFactoryImpl
extends java.lang.Object
implements EndPointFactory

This class uses the Factory Method pattern design to build new EndPoints.

Author:
Jordi Pujol 07-jul-2005

Constructor Summary
EndPointFactoryImpl()
          Build a uninitialized EndPointFactoryImpl.
 
Method Summary
 EndPoint buildEndPoint(Application app, Node node)
          Builds a new instance of EndPoint, relating specified Application and Node.
 EndPointFactory setValues(java.lang.Class endPoint)
          Sets initial values for this EndPointFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndPointFactoryImpl

public EndPointFactoryImpl()
Build a uninitialized EndPointFactoryImpl. It requires the setValues(...) invokation.

Method Detail

setValues

public EndPointFactory setValues(java.lang.Class endPoint)
                          throws InitializationException
Sets initial values for this EndPointFactory.

Specified by:
setValues in interface EndPointFactory
Parameters:
endPoint - Class reference to build new EndPoint instances.
Returns:
The same instance once it has been updated.
Throws:
InitializationException - if some error occurs during the initialization process.

buildEndPoint

public EndPoint buildEndPoint(Application app,
                              Node node)
                       throws InitializationException
Builds a new instance of EndPoint, relating specified Application and Node.

Specified by:
buildEndPoint in interface EndPointFactory
Parameters:
app - Application to run over the node.
node - Node over which run the specified application.
Returns:
A new instance of EndPoint that relates the Application and the Node.
Throws:
InitializationException
See Also:
EndPointFactory.buildEndPoint(planet.commonapi.Application, planet.commonapi.Node)