Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 27. Ref
Overview
Copier lienLien copié sur presse-papiers!
				The Ref expression language is really just a way to look up a custom Expression from the Registry. This is particular convenient to use in the XML DSL.
			
				The Ref language is part of 
camel-core.
			Static import
Copier lienLien copié sur presse-papiers!
				To use the Ref language in your Java application code, include the following import statement in your Java source files:
			
import static org.apache.camel.language.simple.RefLanguage.ref;
import static org.apache.camel.language.simple.RefLanguage.ref;XML example
Copier lienLien copié sur presse-papiers!
				For example, the splitter pattern can reference a custom expression using the Ref language, as follows:
			
Java example
Copier lienLien copié sur presse-papiers!
				The preceding route can also be implemented in the Java DSL, as follows:
			
from("seda:a")
  .split().ref("myExpression")
  .to("seda:b");
from("seda:a")
  .split().ref("myExpression")
  .to("seda:b");