p2ps.imp.peer.config
Class InstantiatorConfigImp

java.lang.Object
  extended byp2ps.imp.peer.config.InstantiatorConfigImp
All Implemented Interfaces:
InstantiatorConfig

public class InstantiatorConfigImp
extends java.lang.Object
implements InstantiatorConfig

An implementation of the Instantiator Config interface

Version:
$Revision: 295 $
Author:
Ian Wang

Field Summary
 
Fields inherited from interface p2ps.peer.InstantiatorConfig
CLASS_NAME_TAG, ENABLED_TAG, INSTANTIATOR_CONFIG_TAG
 
Constructor Summary
InstantiatorConfigImp(java.lang.String classname)
          Constucts an instantiator config (enabled)
InstantiatorConfigImp(java.lang.String classname, boolean enabled)
          Constucts an instantiator config
 
Method Summary
 java.lang.String getInstantiatorClass()
           
 Element getXMLElement()
          Outputs the InstantiatorConfig as an XML Element
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
          Sets whether the instantiator is enabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstantiatorConfigImp

public InstantiatorConfigImp(java.lang.String classname)
Constucts an instantiator config (enabled)


InstantiatorConfigImp

public InstantiatorConfigImp(java.lang.String classname,
                             boolean enabled)
Constucts an instantiator config

Method Detail

getInstantiatorClass

public java.lang.String getInstantiatorClass()
Specified by:
getInstantiatorClass in interface InstantiatorConfig
Returns:
the name of the instantiator's Java class

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface InstantiatorConfig
Returns:
true if the instantiator is enabled (default = true)

setEnabled

public void setEnabled(boolean enabled)
Sets whether the instantiator is enabled

Specified by:
setEnabled in interface InstantiatorConfig
Parameters:
enabled -

getXMLElement

public Element getXMLElement()
                      throws java.io.IOException
Outputs the InstantiatorConfig as an XML Element

Specified by:
getXMLElement in interface InstantiatorConfig
Throws:
java.io.IOException