verinec.netsim.processors.applications
Class ApplicationFactory

java.lang.Object
  extended by verinec.netsim.processors.applications.ApplicationFactory

public class ApplicationFactory
extends Object

Version:
$Revision: 791 $
Author:
Dominik Jungo

Constructor Summary
ApplicationFactory()
           
 
Method Summary
static AbstractApplication createApplication(Model model, String name, Node node, String arguments, ILogger logger, String src, String dst)
          Creates a Application
static AbstractApplication createService(Model model, Node node, String name, String parameters)
           
private static Class getImpl(String name)
          returns the Class for a requested Implementation of an application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationFactory

public ApplicationFactory()
Method Detail

getImpl

private static Class getImpl(String name)
                      throws ClassNotFoundException
returns the Class for a requested Implementation of an application. The Application must be in verinec.netsim.processors.applications.

Parameters:
name - name of the application without the trailing verinec.netsim.processors.applications.
Returns:
returns the Class for a requested Implementation
Throws:
ClassNotFoundException - if the Application is not found

createApplication

public static AbstractApplication createApplication(Model model,
                                                    String name,
                                                    Node node,
                                                    String arguments,
                                                    ILogger logger,
                                                    String src,
                                                    String dst)
                                             throws NetSimException
Creates a Application

Parameters:
model - a network model
name - name of the application without the trailing verinec.netsim.processors.applications.
node - node on which the application should be instanciated
arguments - arguments to be passed to the application on startup
logger - logger used by the application
src - source of the application's packets
dst - destination of the application's packets
Returns:
an instance of the applictaion
Throws:
NetSimException - when the Application can not be instanciated

createService

public static AbstractApplication createService(Model model,
                                                Node node,
                                                String name,
                                                String parameters)
                                         throws NetSimException
Throws:
NetSimException

Copyright © 2005 Verinec, DIUF