public interface UpdateListenerHub
UpdateListener
s. Periodically (say, every request during
development, or every minute or so during production), request processing is locked down so that only a single thread
is active, and the active thread invokes fireCheckForUpdates()
. Various services that are dependent on
external resource files (such as classes or template files) can check to see if any file they've used has changed. If
so, the service can invalidate its internal cache, or notify other services (typically via
InvalidationListener
that they should do the same.
Note that this interface has moved from module tapestry-core to tapestry-ioc, but has kept the same package (for
backwards compatibility reasons).
A weak reference to the listener is kept; this ensures that registering as a listener will not prevent a
listener instance from being reclaimed by the garbage collector (this is useful as proxies created by
ObjectLocator.proxy(Class, Class)
may register as listeners, but still be ephemeral).
Starting in Tapestry 5.3, this services does nothing in production mode.Modifier and Type | Method and Description |
---|---|
void |
addUpdateListener(UpdateListener listener)
Adds a listener.
|
void |
fireCheckForUpdates()
Invoked periodically to allow services to check if underlying state has changed.
|
void addUpdateListener(UpdateListener listener)
void fireCheckForUpdates()
InvalidationEventHub
) when such a change occurs.5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.