|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.globus.gridshib.common.LoadableResource
public abstract class LoadableResource
An abstract implementation of the Loadable
interface. This implementation is backed by a file-based
resource.
Note: Subclasses must implement the Loadable#load() method.
Loadable| Field Summary | |
|---|---|
protected long |
lastLoaded
The time (in milliseconds past the epoch) since this LoadableResource instance was
last loaded. |
protected boolean |
loaded
Is true if and only if this LoadableResource
object has been loaded. |
protected File |
resource
The actual resource backing this LoadableResource object. |
| Constructor Summary | |
|---|---|
LoadableResource()
|
|
| Method Summary | |
|---|---|
long |
getLastLoaded()
Gets the lastLoaded property of this
Loadable object. |
File |
getResource()
Get the file-based resource backing this instance of LoadableResource. |
boolean |
isLoaded()
Determines if this Loadable object
has been loaded. |
boolean |
isStale()
Determine if this Loadable object
needs to be reloaded. |
void |
resetLastLoaded()
Resets the lastLoaded property of this
Loadable object. |
protected static URL |
toURL(File file)
Convert the File object to a "file:" URL. |
protected static URL |
toURL(URI uri)
Convert the URI object to a "file:" URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.globus.gridshib.common.Loadable |
|---|
load |
| Field Detail |
|---|
protected File resource
LoadableResource object.
protected boolean loaded
LoadableResource
object has been loaded.
protected long lastLoaded
LoadableResource instance was
last loaded.
| Constructor Detail |
|---|
public LoadableResource()
| Method Detail |
|---|
public File getResource()
LoadableResource.
public boolean isLoaded()
LoadableLoadable object
has been loaded.
isLoaded in interface LoadableLoadable
object has been loaded.Loadablepublic long getLastLoaded()
LoadablelastLoaded property of this
Loadable object.
getLastLoaded in interface LoadableLoadable
object was last loadedLoadablepublic void resetLastLoaded()
LoadablelastLoaded property of this
Loadable object.
resetLastLoaded in interface LoadableLoadablepublic boolean isStale()
LoadableLoadable object
needs to be reloaded.
isStale in interface LoadableLoadable
object is stale (i.e., needs to be reloaded)Loadableprotected static URL toURL(File file)
File object to a "file:" URL.
Returns null if the File is null or
can not be converted to a URL.
protected static URL toURL(URI uri)
URI object to a "file:" URL.
Returns null if the URI is null or
can not be converted to a URL.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||