public class DefaultIntervalLoggerModel extends Object implements IntervalLoggerModel
// Add a new property to the list of current properties
DefaultIntervalLoggerModel model = new DefaultIntervalLoggerModel();
model.addProperty( new DefaultIntervalProperty("YourPropertyName") {
public void refresh() {
value = sYourPropertyStringValue;
}
});
Alternatively to remove only the ThreadNew property do the following.
// Remove default property from middle of the list like ThreadNew
IntervalProperty[] properties = model.getProperties();
for ( IntervalProperty i : properties ) {
if( i.getName().equals("ThreadNew") )
model.removeProperty(i);
}
| Constructor and Description |
|---|
DefaultIntervalLoggerModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(IntervalProperty action)
Add a new property to be included when printing the status message.
|
IntervalProperty[] |
getProperties()
Return all properties.
|
void |
refresh()
Signal properties to update themselves.
|
void |
removeProperty(IntervalProperty action)
Remove property from status messages.
|
public void addProperty(IntervalProperty action)
addProperty in interface IntervalLoggerModelaction - Property to addpublic void removeProperty(IntervalProperty action)
removeProperty in interface IntervalLoggerModelaction - Property to removepublic IntervalProperty[] getProperties()
getProperties in interface IntervalLoggerModelpublic void refresh()
refresh in interface IntervalLoggerModelCopyright © 2021. All rights reserved.