本文整理了Java中org.apache.camel.Route.getId
方法的一些代码示例,展示了Route.getId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Route.getId
方法的具体详情如下:
包路径:org.apache.camel.Route
类名称:Route
方法名:getId
暂无
代码示例来源:origin: org.apache.camel/camel-test
ManagedRouteMBean managedRoute = context.getManagedRoute(route.getId(), ManagedRouteMBean.class);
if (managedRoute.getExchangesTotal() == 0) {
uncoveredRoutes.add(route.getId());
routesSummary.append("\t\tRoute ").append(route.getId()).append(" total: ").append(managedRoute.getExchangesTotal()).append(" (").append(routeCoveragePercentage).append("%)\n");
List<ManagedProcessorMBean> processors = processorsForRoute.get(route.getId());
if (processors != null) {
for (ManagedProcessorMBean managedProcessor : processors) {
代码示例来源:origin: org.apache.camel/camel-metrics
private MetricsStatistics(Route route, Timer responses) {
this.routeId = route.getId();
this.responses = responses;
}
代码示例来源:origin: org.apache.camel/camel-micrometer
public MicrometerMessageHistory(MeterRegistry meterRegistry, Route route, NamedNode namedNode, MicrometerMessageHistoryNamingStrategy namingStrategy, long timestamp) {
super(route.getId(), namedNode, timestamp);
this.meterRegistry = meterRegistry;
this.route = route;
this.namingStrategy = namingStrategy;
this.sample = Timer.start(meterRegistry);
}
代码示例来源:origin: org.apache.camel/camel-hazelcast
@ManagedAttribute(description = "The route id")
public String getRouteId() {
if (route != null) {
return route.getId();
}
return null;
}
代码示例来源:origin: org.apache.camel/camel-consul
@ManagedAttribute(description = "The route id")
public String getRouteId() {
if (route != null) {
return route.getId();
}
return null;
}
代码示例来源:origin: funktionio/funktion-connectors
@Override
public void onExchangeBegin(Route route, Exchange exchange) {
super.onExchangeBegin(route, exchange);
LOG.info("Exchange Begin for route " + route.getId() +
" exchange: " + exchange.getExchangeId());
}
代码示例来源:origin: io.syndesis.integration-runtime/runtime
@Override
public void onExchangeBegin(Route route, Exchange exchange) {
super.onExchangeBegin(route, exchange);
LOG.info("Exchange Begin for route " + route.getId() +
" exchange: " + exchange.getExchangeId());
}
代码示例来源:origin: funktionio/funktion-connectors
@Override
public void onExchangeDone(Route route, Exchange exchange) {
super.onExchangeDone(route, exchange);
LOG.info("Exchange Done for route " + route.getId() +
" exchange: " + exchange.getExchangeId() + " in: " + exchange.getIn().getBody(String.class));
stopCurrentRouteAsync(route);
}
代码示例来源:origin: io.syndesis.integration-runtime/runtime
@Override
public void onExchangeDone(Route route, Exchange exchange) {
super.onExchangeDone(route, exchange);
LOG.info("Exchange Done for route " + route.getId() +
" exchange: " + exchange.getExchangeId() + " in: " + exchange.getIn().getBody(String.class));
try {
stopRoute(route);
} catch (Exception e) {
throw new RuntimeExchangeException(e.getMessage(), exchange, e);
}
}
}
代码示例来源:origin: org.apache.camel/camel-etcd
private void stopConsumer(Route route) {
synchronized (lock) {
try {
if (!suspendedRoutes.contains(route)) {
LOGGER.debug("Stopping consumer for {} ({})", route.getId(), route.getConsumer());
stopConsumer(route.getConsumer());
suspendedRoutes.add(route);
}
} catch (Exception e) {
handleException(e);
}
}
}
代码示例来源:origin: org.apache.camel/camel-hazelcast
private synchronized void startAllStoppedConsumers() {
try {
for (Route route : suspendedRoutes) {
LOGGER.debug("Starting consumer for {} ({})", route.getId(), route.getConsumer());
startConsumer(route.getConsumer());
}
suspendedRoutes.clear();
} catch (Exception e) {
handleException(e);
}
}
代码示例来源:origin: org.apache.camel/camel-etcd
private void startAllStoppedConsumers() {
synchronized (lock) {
try {
for (Route route : suspendedRoutes) {
LOGGER.debug("Starting consumer for {} ({})", route.getId(), route.getConsumer());
startConsumer(route.getConsumer());
}
suspendedRoutes.clear();
} catch (Exception e) {
handleException(e);
}
}
}
代码示例来源:origin: org.apache.camel/camel-infinispan
@Override
public synchronized void onInit(Route route) {
super.onInit(route);
LOGGER.info("Route managed by {}. Setting route {} AutoStartup flag to false.", getClass(), route.getId());
route.getRouteContext().getRoute().setAutoStartup("false");
stoppeddRoutes.add(route);
this.refCount.retain();
startManagedRoutes();
}
代码示例来源:origin: org.apache.camel/camel-micrometer
default Tags getTags(Route route, Exchange exchange) {
return Tags.of(
CAMEL_CONTEXT_TAG, route.getRouteContext().getCamelContext().getName(),
SERVICE_NAME, MicrometerRoutePolicyService.class.getSimpleName(),
ROUTE_ID_TAG, route.getId(),
FAILED_TAG, Boolean.toString(exchange.isFailed())
);
}
代码示例来源:origin: com.bosch.bis.monitoring/bis-event-publisher-impl
private void reportNonCustomRouteIDs(Route route) {
CamelContext camelContext = route.getRouteContext().getCamelContext();
RouteDefinition routeDefinition = camelContext.getRouteDefinition(route.getId());
if (routeDefinition.getCustomId() == null || !routeDefinition.getCustomId()) {
LOG.warn("Problem detected: Route " + StringUtils.quote(route.getId()) + " has no custom ID set! Endpoint URI is " + route.getEndpoint().getEndpointUri());
}
}
代码示例来源:origin: org.apache.camel/camel-micrometer
default Tags getTags(Route route, NamedNode node) {
return Tags.of(
CAMEL_CONTEXT_TAG, route.getRouteContext().getCamelContext().getName(),
SERVICE_NAME, MicrometerMessageHistoryService.class.getSimpleName(),
ROUTE_ID_TAG, route.getId(),
NODE_ID_TAG, node.getId()
);
}
代码示例来源:origin: org.apache.camel/camel-spring-boot
public RouteDetailsInfo(final CamelContext camelContext, final Route route) {
super(route);
if (camelContext.getManagementStrategy().getManagementAgent() != null) {
this.routeDetails = new RouteDetails(camelContext.getManagedRoute(route.getId(), ManagedRouteMBean.class));
}
}
代码示例来源:origin: org.apache.camel/camel-quartz2
@Override
public void onInit(Consumer consumer) {
this.consumer = consumer;
// find the route of the consumer
for (Route route : consumer.getEndpoint().getCamelContext().getRoutes()) {
if (route.getConsumer() == consumer) {
this.routeId = route.getId();
break;
}
}
}
代码示例来源:origin: org.apache.camel/camel-spring-boot
public RouteInfo(Route route) {
this.id = route.getId();
this.description = route.getDescription();
this.uptime = route.getUptime();
this.uptimeMillis = route.getUptimeMillis();
if (route instanceof StatefulService) {
this.status = ((StatefulService) route).getStatus().name();
} else {
this.status = null;
}
}
代码示例来源:origin: org.apache-extras.camel-extra/camel-esper
@Override
protected void doStart() throws Exception {
super.doStart();
if (statement.isDestroyed()) {
// statement is destroyed! re-init it!
statement = endpoint.createStatement(getRoute().getId());
}
if(endpoint.isListen()) {
statement.addListener(this);
} else {
log.debug("Start esper consumer eql='"+endpoint.getEndpointConfiguration().getParameter("eql")+"' without listener!");
}
}
内容来源于网络,如有侵权,请联系作者删除!