You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/03/23 15:13:31 UTC
svn commit: r521735 -
/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java
Author: chirino
Date: Fri Mar 23 07:13:30 2007
New Revision: 521735
URL: http://svn.apache.org/viewvc?view=rev&rev=521735
Log:
adding the Route class I forgot to checkin
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java?view=diff&rev=521735&r1=521734&r2=521735
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Route.java Fri Mar 23 07:13:30 2007
@@ -17,23 +17,49 @@
*/
package org.apache.camel;
+import java.util.HashMap;
+import java.util.Map;
+
/**
+ * A route defines the processing used on an inbound message exchange
+ * from a specific {@see Endpoint}
+ *
* @version $Revision$
*/
public class Route<E extends Exchange> {
- private final Endpoint<E> endpoint;
- private final Processor<E> processor;
- public Route(Endpoint<E> endpoint, Processor<E> processor) {
- this.endpoint = endpoint;
- this.processor = processor;
- }
-
- public Endpoint<E> getEndpoint() {
- return endpoint;
- }
-
- public Processor<E> getProcessor() {
- return processor;
- }
+ final private Map<String, Object> properties = new HashMap<String, Object>(16);
+ private Endpoint<E> endpoint;
+ private Processor<E> processor;
+
+ public Route(Endpoint<E> endpoint, Processor<E> processor) {
+ this.endpoint = endpoint;
+ this.processor = processor;
+ }
+
+ public Endpoint<E> getEndpoint() {
+ return endpoint;
+ }
+
+ public void setEndpoint(Endpoint<E> endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public Processor<E> getProcessor() {
+ return processor;
+ }
+
+ public void setProcessor(Processor<E> processor) {
+ this.processor = processor;
+ }
+
+ /**
+ * This property map is used to associate information about
+ * the route.
+ *
+ * @return
+ */
+ public Map<String, Object> getProperties() {
+ return properties;
+ }
}