org.springframework.aop.TargetSource implementation that
wraps a refreshable target object. Subclasses can determine whether a
refresh is required, and need to provide fresh target objects.
Implements the Refreshable interface in order to allow for
explicit control over the refresh status.
requiresRefresh(), freshTarget()
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private long | |
| protected final Log | logger
Logger available to subclasses. |
| private long | |
| private long | |
| protected Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract Object | |
| public synchronized long | getLastRefreshTime()
Implements org. |
| public synchronized long | getRefreshCount()
Implements org. |
| public final synchronized Object | |
| public synchronized Class | getTargetClass()
Implements org. TargetSource.
|
| public final synchronized void | refresh()
Implements org. |
| private boolean | |
| protected boolean | |
| public void |
| lastRefreshCheck | back to summary |
|---|---|
| private long lastRefreshCheck | |
| lastRefreshTime | back to summary |
|---|---|
| private long lastRefreshTime | |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| refreshCheckDelay | back to summary |
|---|---|
| private long refreshCheckDelay | |
| refreshCount | back to summary |
|---|---|
| private long refreshCount | |
| targetObject | back to summary |
|---|---|
| protected Object targetObject
| |
| AbstractRefreshableTargetSource | back to summary |
|---|---|
| public AbstractRefreshableTargetSource() | |
| freshTarget | back to summary |
|---|---|
| protected abstract Object freshTarget() Obtain a fresh target object. Only invoked if a refresh check has found that a refresh is required
(that is,
| |
| getLastRefreshTime | back to summary |
|---|---|
| public synchronized long getLastRefreshTime() Implements org. Doc from org. Return the last time an actual refresh happened (as timestamp).
| |
| getRefreshCount | back to summary |
|---|---|
| public synchronized long getRefreshCount() Implements org. Doc from org. Return the number of actual refreshes since startup.
| |
| getTarget | back to summary |
|---|---|
| public final synchronized Object getTarget() Implements org. Doc from org. Return a target instance. Invoked immediately before the AOP framework calls the "target" of an AOP method invocation. | |
| getTargetClass | back to summary |
|---|---|
| public synchronized Class Implements org. Doc from org. Return the type of targets returned by this Can return
| |
| refresh | back to summary |
|---|---|
| public final synchronized void refresh() Implements org. Doc from org. Refresh the underlying target object.
| |
| refreshCheckDelayElapsed | back to summary |
|---|---|
| private boolean refreshCheckDelayElapsed() | |
| requiresRefresh | back to summary |
|---|---|
| protected boolean requiresRefresh() Determine whether a refresh is required. Invoked for each refresh check, after the refresh check delay has elapsed. The default implementation always returns
| |
| setRefreshCheckDelay | back to summary |
|---|---|
| public void setRefreshCheckDelay(long refreshCheckDelay) Set the delay between refresh checks, in milliseconds. Default is -1, indicating no refresh checks at all. Note that an actual refresh will only happen when
| |