net.sf.mmm.util.xml.base.jaxb
Interface JaxbBeanHolder<T>

Type Parameters:
T - is the generic type of the JAXB bean.
All Superinterfaces:
Refreshable
All Known Implementing Classes:
JaxbBeanHolderImpl

public interface JaxbBeanHolder<T>
extends Refreshable

This class is a container holding a JAXB bean. Storing this JaxbBeanHolder instead of the bean itself in a field of some class allows the actual bean to be reloaded in the meantime. If Flushable is implemented, then it can also be saved via Flushable.flush().

Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Method Summary
 T getBean()
          This method gets the current JAXB bean.
 boolean refresh()
          This method will reload the configuration if it has changed.
 

Method Detail

getBean

T getBean()
This method gets the current JAXB bean.

Returns:
the current JAXB bean.

refresh

boolean refresh()
This method will reload the configuration if it has changed. This method refreshes the given object. This can be anything from reloading configuration to rebuilding the internal state. An invocation of this method may be expensive and should only be invoked as needed. The implementation of this method should be thread-safe if the object itself is to be used by separate consumers at all.

Specified by:
refresh in interface Refreshable
Returns:
true if something has changed, false otherwise. If the implementation can not determine the change it should return true.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.