|
Appia Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.appia.xml.Configuration
public class Configuration
This class represents a configuration. This configuration is designed to reproduce all the information contained in a XML configuration file or string.
Constructor Summary | |
---|---|
Configuration()
Builds an empty configuration. |
|
Configuration(Appia appia)
Builds an empty configuration. |
Method Summary | |
---|---|
void |
addSession(java.lang.String name,
int sharing)
Adds a new session to the current template. |
void |
addTemplate(java.lang.String name)
Adds a new template to the configuration. |
Channel |
createChannel(java.lang.String name,
java.lang.String templateName,
java.lang.String label,
ChannelProperties params,
boolean initialized,
EventScheduler eventScheduler,
MemoryManager mm,
JMXConfiguration jmxConfig,
java.lang.String msgFactory)
Creates a channel based on a chosen template with the given parameters. |
Channel |
createChannel(java.lang.String name,
java.lang.String templateName,
java.lang.String label,
ChannelProperties params,
boolean initialized,
MemoryManager mm,
boolean managed,
java.lang.String msgFactory)
Creates a channel based on a chosen template with the given parameters. |
void |
createChannels()
Creates the channels stored in memory by the storeChannel() method. |
Channel |
getChannel(java.lang.String name)
Returns a chosen Channel based on its name. |
Channel[] |
getChannelList()
Returns the list of created channels.. |
JMXConfiguration |
getJMXConfiguration()
Gets the instance of the JMX configuration. |
void |
printConfig()
FOR TESTING PURPOSES ONLY! |
void |
setEventScheduler(java.lang.String className)
TODO: remove some exceptions!!! |
void |
setProtocol(java.lang.String protocol)
Associates a protocol to the last session added. |
void |
setThreadFactory(java.lang.String className)
|
void |
storeChannel(java.lang.String name,
java.lang.String templateName,
java.lang.String label,
ChannelProperties params,
boolean initialized,
MemoryManager mm,
boolean managed,
java.lang.String msgFact)
Stores all the information of a channel. |
void |
useMultiSchedulers(boolean multiSchedulers)
Defines the type of event scheduler attribution. |
boolean |
usesGlobalScheduler()
Tests if configuration is using a global EventScheduler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configuration()
public Configuration(Appia appia) throws AppiaXMLException
AppiaXMLException
Method Detail |
---|
public void useMultiSchedulers(boolean multiSchedulers)
Defines the type of event scheduler attribution.
If multiSchedulers is false, use a global event scheduler.
If multiSchedulers is true, use multiple schedulers.
multiSchedulers
- true if using multi schedulers.public boolean usesGlobalScheduler()
public void setEventScheduler(java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
className
-
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void setThreadFactory(java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public void addTemplate(java.lang.String name)
name
- name of the template.public void addSession(java.lang.String name, int sharing)
name
- the name of the session.sharing
- the kind of sharing.SharingState
public void setProtocol(java.lang.String protocol) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
protocol
- the String description of the protocol.
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public JMXConfiguration getJMXConfiguration()
public void storeChannel(java.lang.String name, java.lang.String templateName, java.lang.String label, ChannelProperties params, boolean initialized, MemoryManager mm, boolean managed, java.lang.String msgFact)
name
- the channel name.templateName
- the template name.label
- the String label associated with the channel.params
- the parameters to be passed to their respective sessions.initialized
- whether or not the channel is returned initialized.public void createChannels() throws AppiaXMLException
AppiaXMLException
public Channel createChannel(java.lang.String name, java.lang.String templateName, java.lang.String label, ChannelProperties params, boolean initialized, MemoryManager mm, boolean managed, java.lang.String msgFactory) throws AppiaXMLException
name
- the channel name.templateName
- the template name.label
- the String label associated with the channel.params
- the parameters to be passed to their respective sessions.initialized
- whether or not the channel is returned initialized.
AppiaException
AppiaXMLException
ChannelProperties
public Channel createChannel(java.lang.String name, java.lang.String templateName, java.lang.String label, ChannelProperties params, boolean initialized, EventScheduler eventScheduler, MemoryManager mm, JMXConfiguration jmxConfig, java.lang.String msgFactory) throws AppiaXMLException
name
- the channel name.templateName
- the template name.label
- the String label associated with the channel.params
- the parameters to be passed to their respective sessions.initialized
- whether or not the channel is returned initialized.eventScheduler
- the EventScheduler to use in the channel.
AppiaException
AppiaXMLException
ChannelProperties
public Channel getChannel(java.lang.String name)
name
- the channel's name.
public Channel[] getChannelList()
public void printConfig()
|
Appia Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |