public class OutletConfiguration extends Object
Constructor and Description |
---|
OutletConfiguration(Collection<Outlet> outlets,
Collection<MergepointMapping> mergepointMappings,
UnitDescriptor unitDescriptor)
Creates a OutletConfiguration containing a list of Outlets.
|
Modifier and Type | Method and Description |
---|---|
void |
addOutlet(Outlet outlet,
UnitDescriptor unitDescriptor)
Adds a outlet.
|
Outlet |
getOutlet(QualifiedName name)
Returns the outlet with the name
name . |
Map<QualifiedName,Outlet> |
getOutlets()
Returns a map containing all the configured outlets, keyed by their
name.
|
boolean |
outletExists(QualifiedName qualifiedName)
Returns whether a outlet for the given name exists.
|
void |
resolveMergepointMappings()
Resolves the isolated merge point mappings and adds them to
the relevant outlets.
|
String |
toString()
Creates a String view of this object for debuggung purposes.
|
public OutletConfiguration(Collection<Outlet> outlets, Collection<MergepointMapping> mergepointMappings, UnitDescriptor unitDescriptor) throws ConfigurationException
outlets
- the map of outlets, keyed by their name, not null.mergepointMappings
- all isolated mergepoint mappings, not null.unitDescriptor
- the descriptor of the unit of generation,
not null.ConfigurationException
- if outlets contains
two outlets with the same name.NullPointerException
- if a parameter is null.public void resolveMergepointMappings() throws ConfigurationException
ConfigurationException
- if configuration not foundpublic Map<QualifiedName,Outlet> getOutlets()
IllegalStateException
- if the mergepoint mappings have not
yet been resolved.public Outlet getOutlet(QualifiedName name)
name
.name
- the name of the outlet to be returned.IllegalStateException
- if the mergepoint mappings have not
yet been resolved.public void addOutlet(Outlet outlet, UnitDescriptor unitDescriptor) throws ConfigurationException
outlet
- the outlet to be added, not null.unitDescriptor
- the descriptor of the generation unit,
not null.ConfigurationException
- if a outlet with the outlet's name
already exists in the configuration.NullPointerException
- if outlet is null.public String toString()
toString
in class Object
Object.toString()
public boolean outletExists(QualifiedName qualifiedName)
qualifiedName
- the name of the outlet.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.