org.apache.avalon.fortress.tools
Class Service

java.lang.Object
  extended by org.apache.avalon.fortress.tools.Service

final class Service
extends java.lang.Object

Encapsulate the Service information, and encapsulate all the logic to serialize the service.

Version:
CVS $Revision: 1.1 $ $Date: 2004/04/02 08:29:44 $
Author:
The Avalon Team

Field Summary
private  java.util.Set m_components
           
private  java.lang.String m_type
           
 
Constructor Summary
Service(java.lang.String type)
          Initialize a service with the type name.
 
Method Summary
 void addComponent(Component type)
          Add a component to the service.
 java.util.Iterator getComponents()
           
 java.lang.String getType()
          Get the service type name.
 void serialize(java.io.File rootDir)
          Output the service info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_components

private final java.util.Set m_components

m_type

private final java.lang.String m_type
Constructor Detail

Service

public Service(java.lang.String type)
Initialize a service with the type name.

Parameters:
type -
Method Detail

getType

public java.lang.String getType()
Get the service type name.

Returns:
the type name

addComponent

public void addComponent(Component type)
Add a component to the service.

Parameters:
type - the type name for the component

getComponents

public java.util.Iterator getComponents()

serialize

public void serialize(java.io.File rootDir)
               throws java.io.IOException
Output the service info.

Parameters:
rootDir -
Throws:
java.io.IOException