public class QueryEngineService
extends java.lang.Object
Acts as a RESTful web service. Each of its operations can be called by a service consumer (client). Provides operations that look up for services taking as input a service description.This can be: - A description in a specific query language, named Service Base Query Language (SBQL). - A simple description consisting of a list of names of service operations and a string of requirements of dependencies on other services. - A more advanced query consisting of more detailed functional and non-functional constraints, as well as a string of requirements of dependencies on other services. Searching can be executed over service abstractions (functional and non-functional) or service instances. In all cases the returned result is a javax.ws.rs.core.Response object that contains aQueryEngineServiceResponse
object. The server address a service client must connect to is http://localhost:8080/servicedeployer. To connect with this class (service), the relative path /queryengine must be added, and a service operation's relative path must be added too, so that a complete path for establishing a connection to a specific operation is created. Each service operation's relative path include a username and a password for authorization purposes.Thus, authorization is part of connection establishment and client does not need to post username and password as inputs to an operation. Every operation returns a javax.ws.rs.core.Response object that contains aQueryEngineServiceResponse
object. If something goes wrong about network connection or service searching, the relevant error fields of QueryEngineResponse object are filled in properly. Otherwise, the relevant information fields of QueryEngineResponse are filled properly.
Constructor and Description |
---|
QueryEngineService() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
executeAdvancedQueryOverAbstractions(java.lang.String username,
java.lang.String password,
AdvancedQuery query)
Looks up for services, taking as input an advanced query.
|
javax.ws.rs.core.Response |
executeAdvancedQueryOverInstances(java.lang.String username,
java.lang.String password,
AdvancedQuery query)
Looks up for services, taking as input an advanced query.
|
javax.ws.rs.core.Response |
executeSBQLQuery(java.lang.String username,
java.lang.String password,
java.lang.String sbqlQuery)
Looks up for services, taking as input a SBQL query.
|
javax.ws.rs.core.Response |
executeSimpleQueryOverAbstractions(java.lang.String username,
java.lang.String password,
SimpleQuery query)
Looks up for services, taking as input a simple query.
|
javax.ws.rs.core.Response |
executeSimpleQueryOverInstances(java.lang.String username,
java.lang.String password,
SimpleQuery query)
Looks up for services, taking as input a simple query.
|
public javax.ws.rs.core.Response executeSBQLQuery(java.lang.String username, java.lang.String password, java.lang.String sbqlQuery)
Looks up for services, taking as input a SBQL query. The searching is executed over functional and non-functional service abstractions and the result contains functional and non-functional abstractions.
username
- Username provided during client's connection establishment.password
- Password provided during client's connection establishment.sbqlQuery
- SBQL queryQueryEngineServiceResponse
object.
The QueryEngineResponse object has its functional and non-functional abstractions fields filled.public javax.ws.rs.core.Response executeSimpleQueryOverAbstractions(java.lang.String username, java.lang.String password, SimpleQuery query)
Looks up for services, taking as input a simple query. A simple query contains a list of names of operations and a string of requirements of dependencies on other services. The searching is executed over functional service abstractions and the result contains concrete services.
username
- Username provided during client's connection establishment.password
- Password provided during client's connection establishment.query
- Simple query, containing a list of names of operations and a string of requirements of dependencies on other services.QueryEngineServiceResponse
object.
The QueryEngineResponse object has its concrete services field filled.public javax.ws.rs.core.Response executeSimpleQueryOverInstances(java.lang.String username, java.lang.String password, SimpleQuery query)
Looks up for services, taking as input a simple query. A simple query contains a list of names of operations and a string of requirements of dependencies on other services. The searching is executed over service instances and the result contains concrete services.
username
- Username provided during client's connection establishment.password
- Password provided during client's connection establishment.query
- Simple query, containing a list of names of operations and a string of requirements of dependencies on other services.QueryEngineServiceResponse
object.
The QueryEngineResponse object has its concrete services field filled.public javax.ws.rs.core.Response executeAdvancedQueryOverAbstractions(java.lang.String username, java.lang.String password, AdvancedQuery query)
Looks up for services, taking as input an advanced query. An advanced query contains functional and non-functional constraints, and a string of requirements of dependencies on other services. The searching is executed over functional and non-functional service abstractions and the result contains concrete services.
username
- Username provided during client's connection establishment.password
- Password provided during client's connection establishment.query
- Advanced query, containing functional and non-functional constraints, and a string of
requirements of dependencies on other services.QueryEngineServiceResponse
object.
The QueryEngineResponse object has its concrete services field filled.public javax.ws.rs.core.Response executeAdvancedQueryOverInstances(java.lang.String username, java.lang.String password, AdvancedQuery query)
Looks up for services, taking as input an advanced query. An advanced query contains functional and non-functional constraints, and a string of requirements of dependencies on other services. The searching is executed over service instances and the result contains concrete services.
username
- Username provided during client's connection establishment.password
- Password provided during client's connection establishment.query
- Advanced query, containing functional and non-functional constraints, and a string of
requirements of dependencies on other services.QueryEngineServiceResponse
object.
The QueryEngineResponse object has its concrete services field filled.