org.cid.distribution
Class DistributionProcess

java.lang.Object
  extended by org.cid.distribution.DistributionProcess

public class DistributionProcess
extends java.lang.Object

This class represents a distribution process.

The DistributionProcess class contains all the entities that conform a process, including the set of nodes and components that take part in it, and also other atributes like the name, the starting node, and user defined properties.

Version:
$Revision:127 $

Constructor Summary
DistributionProcess()
          Build a new DistributionProcess
 
Method Summary
 void addComponent(DistributionComponent component)
          Adds a MessageOutputChannel to this list.
 void addFunctionMapping(java.lang.String prefix, java.lang.String className)
          Adds a function namespace mapping to the list.
 void addNode(DistributionNode node)
          Adds a Node to this list.
 void addProperties(java.lang.String propertyFile)
           
 void addProperty(java.lang.String name, java.lang.String value)
          Adds a property to the list.
 DistributionComponent getComponent(java.lang.String componentId)
          Returns a component.
 java.util.HashMap<java.lang.String,DistributionComponent> getComponents()
           
 java.lang.String getDescription()
           
 boolean getEnabled()
           
 org.apache.commons.vfs.FileSystemManager getFsManager()
           
 java.util.HashMap<java.lang.String,java.lang.Class> getFunctionMappings()
           
 java.lang.String getName()
           
 DistributionNode getNode(java.lang.String nodeId)
          Returns a node.
 java.util.HashMap<java.lang.String,DistributionNode> getNodes()
           
 java.util.HashMap<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getStart()
           
 void process()
          Processes this list, doing the complete job of retrieving messages and processing them through the message nodes chain.
 void setDescription(java.lang.String description)
           
 void setEnabled(java.lang.String enabled)
           
 void setName(java.lang.String name)
           
 void setStart(java.lang.String start)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionProcess

public DistributionProcess()
Build a new DistributionProcess

Method Detail

process

public void process()
             throws DistributionException
Processes this list, doing the complete job of retrieving messages and processing them through the message nodes chain. It also calls all message generators that are scheduled.

Throws:
DistributionException

getDescription

public java.lang.String getDescription()
Returns:
Returns the description (Expr).

getName

public java.lang.String getName()
Returns:
Returns the name (Expr).

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - The description to set.

setEnabled

public void setEnabled(java.lang.String enabled)
Parameters:
disabled - The enabled to set.

getEnabled

public boolean getEnabled()
Returns:
Returns the enabled (Expr).

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.

getStart

public java.lang.String getStart()
Returns:
Returns the start.

setStart

public void setStart(java.lang.String start)
Parameters:
start - The start to set.

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Adds a property to the list. If the property already exists it will be overriden. When started from command line, distribution makes the command line properties override the ones specified in the file.


addNode

public void addNode(DistributionNode node)
             throws DistributionConfigurationException
Adds a Node to this list.

Throws:
DistributionConfigurationException

addComponent

public void addComponent(DistributionComponent component)
                  throws DistributionConfigurationException
Adds a MessageOutputChannel to this list.

Throws:
DistributionConfigurationException

addFunctionMapping

public void addFunctionMapping(java.lang.String prefix,
                               java.lang.String className)
                        throws DistributionConfigurationException
Adds a function namespace mapping to the list. This allows to plug in functions to be used in expressions..

Parameters:
prefix - The prefix that will be used to access this functions.
className - The classname of the class that implements the functions.
Throws:
DistributionConfigurationException

getNode

public DistributionNode getNode(java.lang.String nodeId)
Returns a node.


getComponent

public DistributionComponent getComponent(java.lang.String componentId)
Returns a component.


getComponents

public java.util.HashMap<java.lang.String,DistributionComponent> getComponents()
Returns:
Returns the components.

getNodes

public java.util.HashMap<java.lang.String,DistributionNode> getNodes()
Returns:
Returns the nodes.

getProperties

public java.util.HashMap<java.lang.String,java.lang.String> getProperties()
Returns:
Returns the properties.

getFunctionMappings

public java.util.HashMap<java.lang.String,java.lang.Class> getFunctionMappings()
Returns:
Returns the functionMappings.

getFsManager

public org.apache.commons.vfs.FileSystemManager getFsManager()
Returns:
Returns the fsManager.

addProperties

public void addProperties(java.lang.String propertyFile)


Copyright © 2006 null. All Rights Reserved.