|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultRestRegistry
public class DefaultRestRegistry
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.camel.spi.RestRegistry |
|---|
RestRegistry.RestService |
| Field Summary |
|---|
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
DefaultRestRegistry()
|
|
| 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. |
protected void |
doStart()
Implementations override this method to support customized start/stop. |
protected void |
doStop()
Implementations override this method to support customized start/stop. |
CamelContext |
getCamelContext()
Get the CamelContext |
List<RestRegistry.RestService> |
listAllRestServices()
List all REST services from this registry. |
void |
removeRestService(Consumer consumer)
Removes the REST service from the registry |
void |
setCamelContext(CamelContext camelContext)
Injects the CamelContext |
int |
size()
Number of rest services in the registry. |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Constructor Detail |
|---|
public DefaultRestRegistry()
| Method Detail |
|---|
public void addRestService(Consumer consumer,
String url,
String baseUrl,
String basePath,
String uriTemplate,
String method,
String consumes,
String produces,
String inType,
String outType)
RestRegistry
addRestService in interface RestRegistryconsumer - the consumerurl - the absolute url of the REST servicebaseUrl - the base url of the REST servicebasePath - the base pathuriTemplate - the uri templatemethod - the HTTP methodconsumes - optional details about what media-types the REST service acceptsproduces - optional details about what media-types the REST service returnsinType - optional detail input binding to a FQN class nameoutType - optional detail output binding to a FQN class namepublic void removeRestService(Consumer consumer)
RestRegistry
removeRestService in interface RestRegistryconsumer - the consumerpublic List<RestRegistry.RestService> listAllRestServices()
RestRegistry
listAllRestServices in interface RestRegistrypublic int size()
RestRegistry
size in interface RestRegistrypublic CamelContext getCamelContext()
CamelContextAwareCamelContext
getCamelContext in interface CamelContextAwarepublic void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContext
setCamelContext in interface CamelContextAwarecamelContext - the Camel context
protected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.
doStart in class ServiceSupportExceptionServiceSupport.doStop()
protected void doStop()
throws Exception
ServiceSupportServiceSupport.doStop() method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext is shutting down.
doStop in class ServiceSupportExceptionServiceSupport.doStart()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||