Methods Summary |
---|
public boolean | exists(java.lang.String host, int port)Checks whether a LoginInfo for given host and port exists in this store.
|
public java.lang.String | getName()Returns the name of the store.
This is any name that the store implementation wants to use for identification, for instance.
|
public java.util.Collection | list()A convenience method that returns the Collection of LoginInfo instances stored in this store.
An empty Collection is returned when there are no LoginInfo items stored.
|
public LoginInfo | read(java.lang.String host, int port)Returns a {@link LoginInfo} corresponding to the given host and port, from this store.
The host may not be null. For a given host and port, there can be at most
one LoginInfo in this store.
|
public void | remove(java.lang.String host, int port)Removes the {@link LoginInfo} corresponding to the given host and port, from this store.
The host may not be null. If no such LoginInfo exists, StoreException results.
The caller thus must ensure if such a LoginInfo exists before calling this method.
Upon successful return, size of this store decreases by one.
|
public int | size()A convenience method that returns the number of LoginInfo instances stored in this store.
Zero is returned when no login information is stored.
|
public void | store(LoginInfo login)Stores the given LoginInfo in this store. Given LoginInfo may not be null.
Upon successful return, the size of this store increases by one. An exception is thrown
if there is already a LoginInfo with given host and port.
|
public void | store(LoginInfo login, boolean overwrite)Stores the given LoginInfo in this store. Given LoginInfo may not be null.
Upon successful return, the size of this store increases by one. An exception is thrown
if there is already a LoginInfo with given host and port and overwrite is false.
If overwrite is true, the given LoginInfo is stored regardless of whether it already
exists in this store. Depending upon the value of overwrite, the store is either unchanged
or not.
|