public interface LoginInfoStore
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String host,
int port)
Checks whether a LoginInfo for given host and port exists in this store.
|
String |
getName()
Returns the name of the store.
|
Collection<LoginInfo> |
list()
A convenience method that returns the Collection of LoginInfo instances stored in this store.
|
LoginInfo |
read(String host,
int port)
Returns a
LoginInfo corresponding to the given host and port, from this store. |
void |
remove(String host,
int port)
Removes the
LoginInfo corresponding to the given host and port, from this store. |
int |
size()
A convenience method that returns the number of LoginInfo instances stored in this store.
|
void |
store(LoginInfo login)
Stores the given LoginInfo in this store.
|
void |
store(LoginInfo login,
boolean overwrite)
Stores the given LoginInfo in this store.
|
LoginInfo read(String host, int port) throws StoreException
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.host - a non null String representing host nameport - an integer specifying the port numberStoreException - if there is something wrong with reading the storeIllegalArgumentException - if the parameter host is nullvoid remove(String host, int port) throws StoreException
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.host - a non null String representing host nameport - an integer specifying the port numberStoreException - if there is something wrong with reading the store or if there is
no such LoginInfoIllegalArgumentException - if the parameter host is nullvoid store(LoginInfo login) throws StoreException
login - a LoginInfo that needs to be storedStoreException - if there's any problem or if there is already a LoginInfo
with given host and portIllegalArgumentException - if the given LoginInfo is nullvoid store(LoginInfo login, boolean overwrite) throws StoreException
login - a LoginInfo that needs to be storedStoreException - if there's any problem in storing or if overwrite is false and
the LoginInfo with given host and port already existsIllegalArgumentException - if the given LoginInfo is nullboolean exists(String host, int port) throws StoreException
host - a non null String representing host nameport - an integer specifying the port numberStoreException - if there's any problem reading the storeCollection<LoginInfo> list() throws StoreException
StoreException - if there's any problem reading the storeint size() throws StoreException
StoreException - if there's any problem reading the storeString getName()
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.