public interface Route extends EndpointAware
Endpoint
within a CamelContext
.
Use the API from CamelContext
to control the lifecycle of a route,
such as starting and stopping using the RouteController.startRoute(String)
and RouteController.stopRoute(String)
methods.Modifier and Type | Field and Description |
---|---|
static String |
CUSTOM_ID_PROPERTY |
static String |
DESCRIPTION_PROPERTY |
static String |
GROUP_PROPERTY |
static String |
ID_PROPERTY |
static String |
PARENT_PROPERTY |
static String |
REST_PROPERTY |
Modifier and Type | Method and Description |
---|---|
void |
addService(Service service)
Adds a service to this route
|
List<Processor> |
filter(String pattern)
Returns a list of all the
Processor s from this route that has id's matching the pattern |
CamelContext |
getCamelContext()
Gets the camel context
|
Consumer |
getConsumer()
Gets the inbound
Consumer |
String |
getDescription()
Gets the route description (if any has been configured).
|
String |
getGroup()
Gets the route group
|
String |
getId()
Gets the route id
|
Processor |
getProcessor()
Gets the
Processor |
Map<String,Object> |
getProperties()
This property map is used to associate information about the route.
|
RouteContext |
getRouteContext()
Gets the route context
|
List<Service> |
getServices()
Returns the services for this particular route
|
String |
getUptime()
Gets the uptime in a human readable format
|
long |
getUptimeMillis()
Gets the uptime in milliseconds
|
Navigate<Processor> |
navigate()
Returns a navigator to navigate this route by navigating all the
Processor s. |
void |
onStartingServices(List<Service> services)
A strategy callback allowing special initialization when services are starting.
|
boolean |
supportsSuspension()
Whether or not the route supports suspension (suspend and resume)
|
void |
warmUp()
Callback preparing the route to be started, by warming up the route.
|
getEndpoint
static final String ID_PROPERTY
static final String CUSTOM_ID_PROPERTY
static final String PARENT_PROPERTY
static final String GROUP_PROPERTY
static final String REST_PROPERTY
static final String DESCRIPTION_PROPERTY
String getUptime()
long getUptimeMillis()
Consumer getConsumer()
Consumer
Processor getProcessor()
Processor
boolean supportsSuspension()
Map<String,Object> getProperties()
String getDescription()
DESCRIPTION_PROPERTY
as key in the getProperties()
.RouteContext getRouteContext()
CamelContext getCamelContext()
void onStartingServices(List<Service> services) throws Exception
services
- the serviceException
- is thrown in case of errorList<Service> getServices()
void addService(Service service)
service
- the serviceNavigate<Processor> navigate()
Processor
s.Processor
.List<Processor> filter(String pattern)
Processor
s from this route that has id's matching the patternpattern
- the pattern to match by idsProcessor
, is never null.void warmUp()
Apache Camel