[jboss-svn-commits] JBL Code SVN: r6912 - in labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb: . couriers
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Oct 19 10:37:34 EDT 2006
Author: estebanschifman
Date: 2006-10-19 10:37:28 -0400 (Thu, 19 Oct 2006)
New Revision: 6912
Added:
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/Courier.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/CourierException.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/CourierFactory.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/JmsCourier.java
Removed:
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/Dispatcher.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/DispatcherException.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/DispatcherFactory.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/JmsDispatcher.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/
Log:
Rename: from Dispatcher to Courier
Copied: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers (from rev 6910, labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers)
Copied: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/Courier.java (from rev 6910, labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/Dispatcher.java)
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/Dispatcher.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/Courier.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * 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.soa.esb.couriers;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.message.Message;
+
+public abstract class Courier
+{
+
+ public abstract boolean deliver(Message message) throws CourierException;
+
+ // no default constructor
+ private Courier() {}
+
+ // protected constructor
+ protected Courier (EPR epr)
+ {
+ _epr = epr;
+ }
+
+
+ EPR _epr;
+}
Copied: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/CourierException.java (from rev 6910, labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/DispatcherException.java)
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/DispatcherException.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/CourierException.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * 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.soa.esb.couriers;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * Dispatch Exception.
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ */
+public class CourierException extends BaseException
+{
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct an exception instance.
+ * @param message Exception message.
+ */
+ public CourierException(String message) { super(message); }
+
+ /**
+ * Construct an exception instance.
+ * @param message Exception message.
+ * @param cause Exception cause.
+ */
+ public CourierException(String message, Throwable cause) { super(message, cause); }
+
+ /**
+ * Construct an exception instance.
+ * @param cause Exception cause.
+ */
+ public CourierException(Throwable cause) { super(cause); }
+}
Copied: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/CourierFactory.java (from rev 6910, labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/DispatcherFactory.java)
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/DispatcherFactory.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/CourierFactory.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * 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.soa.esb.couriers;
+
+import java.net.URISyntaxException;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.helpers.*;
+
+public class CourierFactory
+{
+ // private default constructor
+ private CourierFactory() {}
+
+ public static CourierFactory getInstance(Object obj)
+ {
+ return _instance;
+ }
+
+ public static Courier getDispatcher(EPR epr) throws CourierException
+ {
+ try
+ {
+ String address = epr.getAddr().getAddress();
+ if (address.startsWith(JMSEpr.JMS_PROTOCOL))
+ return new JmsCourier(epr);
+ }
+ catch (URISyntaxException e) { throw new CourierException(e); }
+ throw new CourierException("Unknown protocol");
+ }
+
+ private static final CourierFactory _instance = new CourierFactory();
+}
Deleted: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/Dispatcher.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/Dispatcher.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/Dispatcher.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * 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.soa.esb.dispatchers;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.message.Message;
-
-public abstract class Dispatcher
-{
-
- public abstract boolean dispatch(Message message) throws DispatcherException;
-
- // no default constructor
- private Dispatcher() {}
-
- // protected constructor
- protected Dispatcher (EPR epr)
- {
- _epr = epr;
- }
-
-
- EPR _epr;
-}
Deleted: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/DispatcherException.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/DispatcherException.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/DispatcherException.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * 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.soa.esb.dispatchers;
-
-import org.jboss.soa.esb.BaseException;
-
-/**
- * Dispatch Exception.
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- */
-public class DispatcherException extends BaseException
-{
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Construct an exception instance.
- * @param message Exception message.
- */
- public DispatcherException(String message) { super(message); }
-
- /**
- * Construct an exception instance.
- * @param message Exception message.
- * @param cause Exception cause.
- */
- public DispatcherException(String message, Throwable cause) { super(message, cause); }
-
- /**
- * Construct an exception instance.
- * @param cause Exception cause.
- */
- public DispatcherException(Throwable cause) { super(cause); }
-}
Deleted: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/DispatcherFactory.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/DispatcherFactory.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/DispatcherFactory.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * 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.soa.esb.dispatchers;
-
-import java.net.URISyntaxException;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.helpers.*;
-
-public class DispatcherFactory
-{
- // private default constructor
- private DispatcherFactory() {}
-
- public static DispatcherFactory getInstance(Object obj)
- {
- return _instance;
- }
-
- public static Dispatcher getDispatcher(EPR epr) throws DispatcherException
- {
- try
- {
- String address = epr.getAddr().getAddress();
- if (address.startsWith(JMSEpr.JMS_PROTOCOL))
- return new JmsDispatcher(epr);
- }
- catch (URISyntaxException e) { throw new DispatcherException(e); }
- throw new DispatcherException("Unknown protocol");
- }
-
- private static final DispatcherFactory _instance = new DispatcherFactory();
-}
Copied: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/JmsCourier.java (from rev 6910, labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/JmsDispatcher.java)
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/JmsDispatcher.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/JmsCourier.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * 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.soa.esb.couriers;
+
+import javax.jms.MessageConsumer;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.helpers.JMSEpr;
+import org.jboss.soa.esb.message.Message;
+
+public class JmsCourier extends Courier
+{
+ JmsCourier(EPR epr)
+ {
+ super(new JMSEpr(epr));
+ _sleepForRetries = 3;
+
+ }
+ protected JMSEpr getEpr() { return (JMSEpr)_epr; }
+
+ @Override
+ public boolean deliver(Message message) throws CourierException
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ protected String _queueName;
+ protected QueueConnection _queueConnection;
+ protected QueueSession _queueSession;
+ protected Queue _queue;
+ protected MessageConsumer _messageReceiver;
+ protected String _messageSelector;
+ protected final long _sleepForRetries; // milliseconds
+}
Deleted: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/JmsDispatcher.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/dispatchers/JmsDispatcher.java 2006-10-19 13:42:40 UTC (rev 6910)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/couriers/JmsDispatcher.java 2006-10-19 14:37:28 UTC (rev 6912)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * 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.soa.esb.dispatchers;
-
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.message.Message;
-
-public class JmsDispatcher extends Dispatcher
-{
- JmsDispatcher(EPR epr)
- {
- super(epr);
- }
-
- @Override
- public boolean dispatch(Message message) throws DispatcherException
- {
- // TODO Auto-generated method stub
- return false;
- }
-}
More information about the jboss-svn-commits
mailing list