[jboss-svn-commits] JBL Code SVN: r23189 - in labs/jbossesb/workspace/skeagh: runtime/src/main/java/org/jboss/esb/deploy/config and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 29 12:21:38 EDT 2008
Author: tfennelly
Date: 2008-09-29 12:21:38 -0400 (Mon, 29 Sep 2008)
New Revision: 23189
Added:
labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceMEP.java
Removed:
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceMEP.java
Modified:
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java
labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml
labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
Log:
Moved the ServiceMEP enum into the Service API
Copied: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceMEP.java (from rev 23186, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceMEP.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceMEP.java (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceMEP.java 2008-09-29 16:21:38 UTC (rev 23189)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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-2008, JBoss Inc.
+ */
+package org.jboss.esb.service;
+
+/**
+ * Service Message Exchange Pattern (MEP) enumeration.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public enum ServiceMEP
+{
+ /**
+ * Service only accepts messages. Doesn't support 'replyTo'.
+ */
+ InOnly,
+ /**
+ * Service only sends messages. Doesn't support invocation.
+ * <p/>
+ * An example of such a service might be a scheduled Service that
+ * periodically queries a DB, from which it generates a message
+ * and sends it to another Service or OutboundRouter.
+ */
+ OutOnly,
+ /**
+ * Service accepts messages. Supports 'replyTo'.
+ */
+ InOut;
+}
\ No newline at end of file
Property changes on: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceMEP.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java 2008-09-29 16:12:56 UTC (rev 23188)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java 2008-09-29 16:21:38 UTC (rev 23189)
@@ -21,6 +21,7 @@
import org.jboss.esb.service.Service;
import org.jboss.esb.service.ServiceName;
+import org.jboss.esb.service.ServiceMEP;
/**
* Service Deployment Configuration.
@@ -44,7 +45,7 @@
/**
* Service Message Exchange Pattern.
*/
- private ServiceMEP messageExchangePattern = ServiceMEP.InOnly;
+ private ServiceMEP serviceMEP = ServiceMEP.InOnly;
/**
* Get the Service Name.
@@ -110,18 +111,18 @@
* Get the configured Message Exchange Pattern.
* @return The configured Message Exchange Pattern.
*/
- public final ServiceMEP getMessageExchangePattern()
+ public final ServiceMEP getServiceMEP()
{
- return messageExchangePattern;
+ return serviceMEP;
}
/**
* Set the configured Message Exchange Pattern.
- * @param messageExchangePattern The configured Message Exchange Pattern.
+ * @param serviceMEP The configured Message Exchange Pattern.
*/
- public final void setMessageExchangePattern(final ServiceMEP messageExchangePattern)
+ public final void setServiceMEP(final ServiceMEP serviceMEP)
{
- this.messageExchangePattern = messageExchangePattern;
+ this.serviceMEP = serviceMEP;
}
/**
@@ -135,7 +136,7 @@
*/
public final boolean isRoutable()
{
- switch(messageExchangePattern)
+ switch(serviceMEP)
{
case InOnly:
case InOut:
Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceMEP.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceMEP.java 2008-09-29 16:12:56 UTC (rev 23188)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceMEP.java 2008-09-29 16:21:38 UTC (rev 23189)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, 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-2008, JBoss Inc.
- */
-package org.jboss.esb.deploy.config;
-
-/**
- * Service Message Exchange Pattern (MEP) enumeration.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public enum ServiceMEP
-{
- /**
- * Service only accepts messages. Doesn't support 'replyTo'.
- */
- InOnly,
- /**
- * Service only sends messages. Doesn't support invocation.
- * <p/>
- * An example of such a service might be a scheduled Service that
- * periodically queries a DB, from which it generates a message
- * and sends it to another Service or {@link org.jboss.esb.routing.OutboundRouter}.
- */
- OutOnly,
- /**
- * Service accepts messages. Supports 'replyTo'.
- */
- InOut;
-}
\ No newline at end of file
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java 2008-09-29 16:12:56 UTC (rev 23188)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/dispatch/AbstractDispatcher.java 2008-09-29 16:21:38 UTC (rev 23189)
@@ -26,7 +26,7 @@
import org.jboss.esb.context.InvocationContext;
import org.jboss.esb.deploy.config.OutboundRouterConfig;
import org.jboss.esb.deploy.config.ServiceConfig;
-import org.jboss.esb.deploy.config.ServiceMEP;
+import org.jboss.esb.service.ServiceMEP;
import org.jboss.esb.failure.DeadLetterPersistanceService;
import org.jboss.esb.federate.bus.BusMessage;
import org.jboss.esb.federate.bus.BusOutboundRouter;
@@ -207,7 +207,7 @@
// If we need to send a reply, send it now...
if(outMessage != null && replyTo != null)
{
- if(service.getMessageExchangePattern() == ServiceMEP.InOut)
+ if(service.getServiceMEP() == ServiceMEP.InOut)
{
// We make a shallow clone in case it's a local service
// invocation...
@@ -215,7 +215,7 @@
}
else
{
- logger.debug("Not sending reply to '" + replyTo + "'. Service '" + serviceName + "' does not support 'replyTo'. Service MEP is '" + service.getMessageExchangePattern() + "'.");
+ logger.debug("Not sending reply to '" + replyTo + "'. Service '" + serviceName + "' does not support 'replyTo'. Service MEP is '" + service.getServiceMEP() + "'.");
}
}
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml 2008-09-29 16:12:56 UTC (rev 23188)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml 2008-09-29 16:21:38 UTC (rev 23189)
@@ -18,8 +18,8 @@
<jb:bindings beanId="serviceConfig" class="org.jboss.esb.deploy.config.ServiceConfig" createOnElement="service">
<jb:wiring property="serviceName" beanIdRef="serviceName" />
<jb:value property="description" data="service/@serviceDescription" />
- <jb:value property="messageExchangePattern" data="service/@mep" decoder="Enum" default="In-Only">
- <jb:decodeParam name="enumType">org.jboss.esb.deploy.config.ServiceMEP</jb:decodeParam>
+ <jb:value property="serviceMEP" data="service/@mep" decoder="Enum" default="In-Only">
+ <jb:decodeParam name="enumType">org.jboss.esb.service.ServiceMEP</jb:decodeParam>
<jb:decodeParam name="In-Only">InOnly</jb:decodeParam>
<jb:decodeParam name="Out-Only">OutOnly</jb:decodeParam>
<jb:decodeParam name="In-Out">InOut</jb:decodeParam>
Modified: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java 2008-09-29 16:12:56 UTC (rev 23188)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java 2008-09-29 16:21:38 UTC (rev 23189)
@@ -24,6 +24,7 @@
import org.jboss.esb.deploy.config.digest.DigestUtil;
import org.jboss.esb.message.MessageProcessor;
import org.jboss.esb.service.ServiceName;
+import org.jboss.esb.service.ServiceMEP;
import org.junit.After;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -220,7 +221,7 @@
MyTestService serviceA = (MyTestService) serviceAConfig.getService();
assertNotNull(serviceA);
assertEquals("propValueA", serviceA.getProp1());
- assertEquals(ServiceMEP.InOnly, serviceAConfig.getMessageExchangePattern());
+ assertEquals(ServiceMEP.InOnly, serviceAConfig.getServiceMEP());
ServiceConfig serviceBConfig = services.get(new ServiceName("service-cat", "service-b"));
assertNotNull(serviceBConfig);
@@ -228,11 +229,11 @@
MyTestService serviceB = (MyTestService) serviceBConfig.getService();
assertNotNull(serviceB);
assertEquals("propValueB", serviceB.getProp1());
- assertEquals(ServiceMEP.InOut, serviceBConfig.getMessageExchangePattern());
+ assertEquals(ServiceMEP.InOut, serviceBConfig.getServiceMEP());
ServiceConfig serviceCConfig = services.get(new ServiceName("service-cat", "service-c"));
assertNotNull(serviceCConfig);
- assertEquals(ServiceMEP.OutOnly, serviceCConfig.getMessageExchangePattern());
+ assertEquals(ServiceMEP.OutOnly, serviceCConfig.getServiceMEP());
}
@Test
More information about the jboss-svn-commits
mailing list