Difference between revisions of "Advanced Topics"
From GCube System
Andrea.manzi (Talk | contribs) (→ISClient interface) |
Andrea.manzi (Talk | contribs) (→Interfacing the Information System) |
||
Line 6: | Line 6: | ||
The gCF implements than a dynamic class loader that ( reading a implementation file that contains the mapping btw | The gCF implements than a dynamic class loader that ( reading a implementation file that contains the mapping btw | ||
the IS interfaces and their implementations) can abstract over the IS technology. | the IS interfaces and their implementations) can abstract over the IS technology. | ||
+ | |||
+ | === ISQuery interface === | ||
+ | |||
+ | The ISQuery interface designs | ||
+ | |||
+ | <pre> | ||
+ | public interface ISQuery<RESULT> { | ||
+ | /** | ||
+ | * Returns the time-to-live of the results of the query. | ||
+ | * @return the time-to-live. | ||
+ | */ | ||
+ | public long getTTL(); | ||
+ | |||
+ | /** | ||
+ | * Sets the time-to-live of the results of the query. | ||
+ | * @param ttl the time-to-live. | ||
+ | */ | ||
+ | public void setTTL(long ttl); | ||
+ | |||
+ | /** | ||
+ | * Returns the textual expression of the query. | ||
+ | * @return the expression. | ||
+ | */ | ||
+ | public String getQueryExpression(); | ||
+ | |||
+ | /** | ||
+ | * Sets the textual expression of the query. | ||
+ | * @param exp the expression. | ||
+ | */ | ||
+ | public void setQueryExpression(String exp); | ||
+ | } | ||
+ | </pre> | ||
=== ISClient interface === | === ISClient interface === |
Revision as of 11:32, 31 March 2008
Contents
Interfacing the Information System
The gCore Frameork has been designed to work independently from a IS specific Implementation. In order to let the gCF unbound from a IS implementation both query & publishing interfaces have been designed. The gCF implements than a dynamic class loader that ( reading a implementation file that contains the mapping btw the IS interfaces and their implementations) can abstract over the IS technology.
ISQuery interface
The ISQuery interface designs
public interface ISQuery<RESULT> { /** * Returns the time-to-live of the results of the query. * @return the time-to-live. */ public long getTTL(); /** * Sets the time-to-live of the results of the query. * @param ttl the time-to-live. */ public void setTTL(long ttl); /** * Returns the textual expression of the query. * @return the expression. */ public String getQueryExpression(); /** * Sets the textual expression of the query. * @param exp the expression. */ public void setQueryExpression(String exp); }
ISClient interface
The IS Client interface defines only two methods:
public <RESULT> List<RESULT> execute(ISQuery<RESULT> query, GCUBEScope scope,GCUBEContext ...context) throws ISMalformedQueryException,ISInvalidQueryException,ISException;
The execute method takes as parameter the query object
public <RESULT, QUERY extends ISQuery<RESULT>> QUERY getQuery(Class<QUERY> clazz) throws ISUnsupportedQueryException;
Sample usage
ISPublisher interface
Sample usage
Service security
Configuring gContainer with Security
Configuring gCube Service with Credentials
--Manuele.simi 20:11, 28 March 2008 (EET)