2.5. API 更改
以下 API 已被弃用并从版本 4 中删除:
-
org.apache.camel.ExchangePattern已删除了InOptionalOut。 -
从
CamelContext中移除getEndpointMap ()方法。 -
删除了
@FallbackConverter,因为您应该改为使用@Converter (fallback = true)。 -
removed
uri属性@EndpointInject,@Produce, 和@Consume替代值(默认)。例如,@Produce (uri = "kafka:cheese")应更改为@Produce ("kafka:cheese") -
删除了
@UriEndpoint上的标签,因为您应该使用类别。 -
删除了
ProducerTemplate上的所有asyncCallback方法。改为使用asyncSend或asyncRequest。 -
Removed
org.apache.camel.spi.OnCamelContextStart.改为使用org.apache.camel.spi.OnCamelContextStarting。 -
Removed
org.apache.camel.spi.OnCamelContextStop.改为使用org.apache.camel.spi.OnCamelContextStopping。 -
将
org.apache.camel.ExtendedCamelContext与org.apache.camel.CamelContext分离。 -
使用
getCamelContextExtension替换org.apache.camel.CamelContext的adapt () -
将
org.apache.camel.ExtendedExchange与org.apache.camel.Exchange分离。 -
使用
getExchangeExtension替换org.apache.camel.ExtendedExchange的adapt () -
交换失败处理状态已从定义为
ExchangePropertyKey.FAILURE_HANDLED的属性移到 ExtendedExchange 的成员,可通过 'isFailureHandled ()'method 访问。 -
从
org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy中删除了Discard和DiscardOldest。 -
删除了
org.apache.camel.builder.SimpleBuilder。在某些情况下,通常在 Camel 内部使用 Java DSL。 -
将
org.apache.camel.support.IntrospectionSupport设置为camel-core-engine,仅供内部使用。最终用户应使用org.apache.camel.spi.BeanInspection替代。 -
从
org.apache.camel.catalog.CamelCatalog中删除了archetypeCatalogAsXml方法。 -
org.apache.camel.health.HealthCheck方法现在默认为false,而不是true。 -
向
org.apache.camel.StreamCache添加了位置方法。 -
从接口
org.apache.camel.main.Listener配置的方法已被删除 -
org.apache.camel.support.EventNotifierSupportabstract 类现在实现了CamelContextAware。 -
CamelContext上的dumpRoutes的类型已从布尔值改为String,以允许指定 xml 或 yaml。
注意
org.apache.camel.support.PluginHelper 提供对以前来自 CamelContext 的 Camel v3 中可用的各种扩展和上下文插件的简单访问。