public interface SingleConfigCode<T extends ConfigBeanProxy>
new SingleConfigCode<HttpListener>() {
public boolean run(HttpListener httpListener) throws PropertyVetoException {
httpListener.setPort("8989");
return true;
}
};
This new SingleConfigCode can then be used with in the ConfigSupport utilities to
run this code within a Transaction freeing the developer to know/care about Transaction
APIs and semantics.Modifier and Type | Method and Description |
---|---|
Object |
run(T param)
Runs the following command passing the configration object.
|
Object run(T param) throws PropertyVetoException, TransactionFailure
param
- is the configuration object protected by the transactionPropertyVetoException
- if the changes cannot be applied
to the configurationTransactionFailure
Copyright © 2019. All rights reserved.