|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdvertService
The AdvertService allows Advertisable
instances to get published to
and queried in an advert directory. Such an advert directory is a meta data
directory with an hierarchical namespace attached, it exists in memory, but
can be exported to, or imported from persistent memory (hard disk).
Method Summary | |
---|---|
void |
add(Advertisable advert,
MetaData metaData,
String path)
Add an Advertisable instance and related meta data to the
AdvertService , at path (absolute or relative to PWD). |
void |
delete(String path)
Remove an Advertisable instance and related meta data from the
AdvertService , at path (absolute or relative to PWD). |
void |
exportDataBase(URI target)
Exports the advert database to persistent memory located at the given URI . |
String[] |
find(MetaData metaData)
Query the AdvertService for entries matching the specified set of
meta data in the MetaData . |
Advertisable |
getAdvertisable(GATContext context,
String path)
Gets an Advertisable instance from the given path (absolute or
relative to PWD). |
Advertisable |
getAdvertisable(String path)
Gets an Advertisable instance from the given path (absolute or
relative to PWD). |
MetaData |
getMetaData(String path)
Gets the MetaData of an Advertisable instance from the
given path (absolute or relative to the PWD). |
String |
getPWD()
Returns the current element of the AdvertService name space used
as reference for relative paths. |
void |
importDataBase(URI source)
Imports the advert database from persistent memory located at the given URI . |
void |
setPWD(String path)
Specify the element of the AdvertService name space to be used as
reference for relative paths. |
Methods inherited from interface org.gridlab.gat.monitoring.Monitorable |
---|
addMetricListener, getMeasurement, getMetricDefinitionByName, getMetricDefinitions, removeMetricListener |
Method Detail |
---|
void add(Advertisable advert, MetaData metaData, String path) throws GATInvocationException
Advertisable
instance and related meta data to the
AdvertService
, at path (absolute or relative to PWD). If an
AdvertService
entry exists at the specified path, that entry gets
overwritten, and a warning is issued.
advert
- instance to be entered into the AdvertService
.metaData
- Meta data to be associated with the passed
Advertisable
.path
- Path (either absolute or relative to PWD) of the new
entry.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.void delete(String path) throws NoSuchElementException, GATInvocationException
Advertisable
instance and related meta data from the
AdvertService
, at path (absolute or relative to PWD).
path
- Path (either absolute or relative to PWD) of the entry to
be deleted.
NoSuchElementException
- The path is incorrect.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.Advertisable getAdvertisable(String path) throws GATInvocationException, NoSuchElementException
Advertisable
instance from the given path (absolute or
relative to PWD). The context used to create the Advertisable object is
the context that was used to create this AdvertService.
path
- Path (either absolute or relative to PWD) of the entry.
Advertisable
instance at the given path
NoSuchElementException
- The path is incorrect.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.Advertisable getAdvertisable(GATContext context, String path) throws GATInvocationException, NoSuchElementException
Advertisable
instance from the given path (absolute or
relative to PWD).
context
- The context to create the Advertisable object with.path
- Path (either absolute or relative to PWD) of the entry.
Advertisable
instance at the given path
NoSuchElementException
- The path is incorrect.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.MetaData getMetaData(String path) throws NoSuchElementException, GATInvocationException
MetaData
of an Advertisable
instance from the
given path (absolute or relative to the PWD).
path
- Path (either absolute or relative to PWD) of the entry.
MetaData
containing the meta data.
NoSuchElementException
- The path is incorrect.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.String[] find(MetaData metaData) throws GATInvocationException
AdvertService
for entries matching the specified set of
meta data in the MetaData
.
metaData
- MetaData
describing the entries to be searched
for.
String
[] of absolute paths, each pointing to a
matching entry. If no matches are found, null
is
returned.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.void setPWD(String path) throws GATInvocationException
AdvertService
name space to be used as
reference for relative paths. This method is equivalent to perform a 'cd'
in the name space. A relative path will be appended to the current path.
path
- New absolute or relative reference path.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.String getPWD() throws GATInvocationException
AdvertService
name space used
as reference for relative paths.
GATInvocationException
- this exception is thrown when all adaptors fail on this
method it contains a tree of exceptions that were the
causes.void exportDataBase(URI target) throws GATInvocationException
URI
.
target
- the location where the advert database should be exported
to.
GATInvocationException
- if something fails during the exportvoid importDataBase(URI source) throws GATInvocationException
URI
.
source
- the location where the advert database should be imported
from.
GATInvocationException
- if something fails during the import
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |