[jboss-cvs] JBoss Messaging SVN: r6447 - trunk/examples/jms/divert/src/org/jboss/jms/example.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 16 09:18:08 EDT 2009


Author: timfox
Date: 2009-04-16 09:18:08 -0400 (Thu, 16 Apr 2009)
New Revision: 6447

Added:
   trunk/examples/jms/divert/src/org/jboss/jms/example/AddForwardingTimeTransformer.java
Log:
missing file

Added: trunk/examples/jms/divert/src/org/jboss/jms/example/AddForwardingTimeTransformer.java
===================================================================
--- trunk/examples/jms/divert/src/org/jboss/jms/example/AddForwardingTimeTransformer.java	                        (rev 0)
+++ trunk/examples/jms/divert/src/org/jboss/jms/example/AddForwardingTimeTransformer.java	2009-04-16 13:18:08 UTC (rev 6447)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.jboss.jms.example;
+
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.server.cluster.Transformer;
+import org.jboss.messaging.utils.SimpleString;
+
+/**
+ * A AddForwardingTimeTransformer
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class AddForwardingTimeTransformer implements Transformer
+{
+   public ServerMessage transform(ServerMessage message)
+   {
+      message.putLongProperty(new SimpleString("time_of_forward"), System.currentTimeMillis());
+            
+      return message;
+   }
+
+}




More information about the jboss-cvs-commits mailing list