org.apache.camel.spi
Interface RestRegistry

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultRestRegistry

public interface RestRegistry
extends Service

A registry of all REST services running within the CamelContext which have been defined and created using the Rest DSL.


Nested Class Summary
static interface RestRegistry.RestService
          Details about the REST service
 
Method Summary
 void addRestService(Consumer consumer, String url, String baseUrl, String basePath, String uriTemplate, String method, String consumes, String produces, String inType, String outType)
          Adds a new REST service to the registry.
 List<RestRegistry.RestService> listAllRestServices()
          List all REST services from this registry.
 void removeRestService(Consumer consumer)
          Removes the REST service from the registry
 int size()
          Number of rest services in the registry.
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Method Detail

addRestService

void addRestService(Consumer consumer,
                    String url,
                    String baseUrl,
                    String basePath,
                    String uriTemplate,
                    String method,
                    String consumes,
                    String produces,
                    String inType,
                    String outType)
Adds a new REST service to the registry.

Parameters:
consumer - the consumer
url - the absolute url of the REST service
baseUrl - the base url of the REST service
basePath - the base path
uriTemplate - the uri template
method - the HTTP method
consumes - optional details about what media-types the REST service accepts
produces - optional details about what media-types the REST service returns
inType - optional detail input binding to a FQN class name
outType - optional detail output binding to a FQN class name

removeRestService

void removeRestService(Consumer consumer)
Removes the REST service from the registry

Parameters:
consumer - the consumer

listAllRestServices

List<RestRegistry.RestService> listAllRestServices()
List all REST services from this registry.

Returns:
all the REST services

size

int size()
Number of rest services in the registry.

Returns:
number of rest services in the registry.


Apache Camel