|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.globus.gridshib.common.LoadableResource
org.globus.gridshib.common.StringMapFile
public class StringMapFile
An implementation of the Loadable interface
for string maps, that is maps of String
into String.
Loadable,
LoadableResource| Field Summary |
|---|
| Fields inherited from class org.globus.gridshib.common.LoadableResource |
|---|
lastLoaded, loaded, resource |
| Constructor Summary | |
|---|---|
StringMapFile(File file)
The primary constructor for obtaining an instance of StringMapFile. |
|
StringMapFile(String pathname)
A convenience constructor that simply converts its String argument into a File object,
and then calls the corresponding constructor. |
|
StringMapFile(URI uri)
A convenience constructor that simply converts its URI argument into a File object,
and then calls the corresponding constructor. |
|
| Method Summary | |
|---|---|
String |
get(String key)
Gets the string value that corresponds to the given key. |
static StringMapFile |
getInstance(File file)
Gets the instance of StringMapFile
that corresponds to the given file. |
static StringMapFile |
getInstance(String pathname)
Creates a File object from the given
pathname and invokes #getInstance(File). |
static StringMapFile |
getInstance(URI uri)
Creates a File object from the given
URI instance and invokes #getInstance(File). |
Set |
getKeySet()
Gets all the ( String) keys
associated with this instance. |
void |
load()
Loads the file and calls #resetLastLoaded(). |
| Methods inherited from class org.globus.gridshib.common.LoadableResource |
|---|
getLastLoaded, getResource, isLoaded, isStale, resetLastLoaded, toURL, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringMapFile(URI uri)
throws LoadException
URI argument into a File object,
and then calls the corresponding constructor.
LoadException
public StringMapFile(String pathname)
throws LoadException
String argument into a File object,
and then calls the corresponding constructor.
LoadException
public StringMapFile(File file)
throws LoadException
StringMapFile. Captures the given
File object and loads the file.
LoadException| Method Detail |
|---|
public static StringMapFile getInstance(URI uri)
throws LoadException
File object from the given
URI instance and invokes #getInstance(File).
uri - the URI of the file that backs
this instance of StringMapFile
StringMapFile
instance that corresponds to the given URI
LoadException - if a new instance of StringMapFile
is required but the file fails to load
public static StringMapFile getInstance(String pathname)
throws LoadException
File object from the given
pathname and invokes #getInstance(File).
pathname - the pathname of the file that backs
this instance of StringMapFile
StringMapFile
instance that corresponds to the given pathname
LoadException - if a new instance of StringMapFile
is required but the file fails to load
public static StringMapFile getInstance(File file)
throws LoadException
StringMapFile
that corresponds to the given file. Such an instance
may have been created previously, in which case that
instance is returned directly. Otherwise, a new instance
of StringMapFile is created and returned.
Use of this method (as opposed to the direct use of the constructor) prevents needless reloading of a file that may have already been loaded.
file - the file that backs this instance of
StringMapFile
StringMapFile
instance that corresponds to the given file
LoadException - if a new instance of StringMapFile
is required but the file fails to loadStringMapFile(File)
public Set getKeySet()
throws LoadException
String) keys
associated with this instance.
If this Loadable object is stale,
reload it first.
StringMapFile instance
LoadException - If unable to reload the Loadable
object (if stale)
public String get(String key)
throws LoadException
Loadable object is stale,
reload it first.
key - a string key
LoadException - If unable to reload the Loadable
object (if stale)
public void load()
throws LoadException
LoadException - If unable to load this Loadable
objectLoadable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||