Search in sources :

Example 6 with ApiVerb

use of com.bluenimble.platform.api.ApiVerb in project serverless by bluenimble.

the class DefaultApiServicesManager method list.

@Override
public void list(Selector selector) {
    if (selector == null || services.isEmpty()) {
        return;
    }
    Iterator<ApiVerb> verbs = services.keySet().iterator();
    while (verbs.hasNext()) {
        ApiVerb verb = verbs.next();
        ApiServiceSet set = services.get(verb);
        Iterator<String> endpoints = set.endpoints();
        if (endpoints == null) {
            continue;
        }
        while (endpoints.hasNext()) {
            boolean cancel = selector.select(set.get(endpoints.next()));
            if (cancel) {
                return;
            }
        }
    }
}
Also used : ApiServiceSet(com.bluenimble.platform.server.impls.fs.ApiServiceSet) ApiVerb(com.bluenimble.platform.api.ApiVerb)

Aggregations

ApiVerb (com.bluenimble.platform.api.ApiVerb)6 ApiServiceExecutionException (com.bluenimble.platform.api.ApiServiceExecutionException)4 Api (com.bluenimble.platform.api.Api)2 ApiRequest (com.bluenimble.platform.api.ApiRequest)2 ApiService (com.bluenimble.platform.api.ApiService)2 Endpoint (com.bluenimble.platform.api.ApiSpace.Endpoint)2 JsonApiOutput (com.bluenimble.platform.api.impls.JsonApiOutput)2 JsonObject (com.bluenimble.platform.json.JsonObject)2 ApiAccessDeniedException (com.bluenimble.platform.api.ApiAccessDeniedException)1 ApiManagementException (com.bluenimble.platform.api.ApiManagementException)1 ApiServiceSet (com.bluenimble.platform.server.impls.fs.ApiServiceSet)1