public interface Configurable
This interface can also be used for actors which load configuration information from non-XML formats, such as GIF images or binary lookup tables. The source argument of the configure() method simply points to such a file.
This interface is designed to be reversible, so that an object can also provide enough information to reconstruct its current configuration. This mechanism is used when writing MoML from instantiated objects, although it could also be used to write a description of the object in other forms. In order for this to work properly calling the configure() method on any object of the same type, given the data returned by the getConfigureSource() and getConfigureText() methods should result in an object that resemble the first as closely as possible.
CompositeActor
,
AtomicActor
Green (bart) |
Green (neuendor) |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the object with data from the specified input source
(a URL) and/or textual data.
|
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure
method was called.
|
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of
this object.
|
void configure(java.net.URL base, java.lang.String source, java.lang.String text) throws java.lang.Exception
This method is defined to throw a very general exception to allow classes that implement the interface to use whatever exceptions are appropriate.
base
- The base relative to which references within the input
are found, or null if this is not known, or there is none.source
- The input source, which specifies a URL, or null
if none.text
- Configuration information given as text, or null if
none.java.lang.Exception
- If something goes wrong.java.lang.String getConfigureSource()
java.lang.String getConfigureText()