[jboss-svn-commits] JBL Code SVN: r6836 - in labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence: . format

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 16 17:14:55 EDT 2006


Author: daniel.brum at jboss.com
Date: 2006-10-16 17:14:54 -0400 (Mon, 16 Oct 2006)
New Revision: 6836

Added:
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStorePlugin.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStoreType.java
Log:


Added: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStorePlugin.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStorePlugin.java	2006-10-16 21:14:40 UTC (rev 6835)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStorePlugin.java	2006-10-16 21:14:54 UTC (rev 6836)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author daniel.brum at jboss.com
+ */
+
+package org.jboss.soa.esb.persistence.format;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.persistence.MessageStore;
+
+
+/**
+* Used to plug in new message stores dynamically. Each plugin is responsible for
+* returning a message store implementation that knows how to handle its own persistence
+* mechanism, i.e: database, file, etc.
+*  
+* @author Daniel Brum
+*
+*/
+
+public interface MessageStorePlugin {
+	
+public static final String MESSAGE_STORE_PLUGIN = "org.jboss.soa.esb.persistence.base.plugin";
+	
+	/**
+	 * @return the message instance.
+	 */
+	
+	public MessageStore getMessageStore ();
+	
+	/**
+	 * @return the unique identifier for this message store plugin.
+	 */
+	
+	public URI getType ();
+
+}

Added: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStoreType.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStoreType.java	2006-10-16 21:14:40 UTC (rev 6835)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/persistence/format/MessageStoreType.java	2006-10-16 21:14:54 UTC (rev 6836)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author daniel.brum at jboss.com
+ */
+
+/**
+ * You get a message store of a specific type when you need it. 
+ *  
+ * @author Daniel Brum
+ *
+ */
+
+package org.jboss.soa.esb.persistence.format;
+
+import java.net.URI;
+
+public abstract class MessageStoreType {
+	/*
+	 * DO NOT reorder this list. New types may be added as required.
+	 */
+	
+	public static URI DATABASE = null;	
+
+	public static URI DEFAULT_TYPE = null;
+	
+	static
+	{
+		try
+		{
+			DATABASE = new URI("urn:jboss:esb:persistence:type:DATABASE");	
+			
+			DEFAULT_TYPE = DATABASE;
+		}
+		catch (Exception ex)
+		{
+			throw new ExceptionInInitializerError(ex.toString());
+		}
+
+	}
+
+}




More information about the jboss-svn-commits mailing list