Author: jim.ma
Date: 2010-05-19 22:50:57 -0400 (Wed, 19 May 2010)
New Revision: 12280
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/HttpEndpoint.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/JMSEndpoint.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointMetaData.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsFactory.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsMetaData.java
Removed:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/
Modified:
spi/branches/jms-integration/pom.xml
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
Log:
[JBWS-2791]:Add HttpEndpoint,JMSEndpoint and JMSEndpointMetaData class;synched code with
trunk
Modified: spi/branches/jms-integration/pom.xml
===================================================================
--- spi/branches/jms-integration/pom.xml 2010-05-20 02:24:07 UTC (rev 12279)
+++ spi/branches/jms-integration/pom.xml 2010-05-20 02:50:57 UTC (rev 12280)
@@ -5,6 +5,7 @@
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-spi</artifactId>
<packaging>jar</packaging>
+ <description>JBossWS SPI</description>
<version>1.3.0-SNAPSHOT</version>
@@ -12,7 +13,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.0.4.GA</version>
+ <version>1.0.6.GA</version>
</parent>
<!-- Source Control Management -->
Modified:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2010-05-20
02:24:07 UTC (rev 12279)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -32,7 +32,7 @@
{
public enum DeploymentType
{
- JAXRPC_JSE, JAXRPC_EJB21, JAXWS_JSE, JAXWS_EJB3,
+ JAXRPC_JSE, JAXRPC_EJB21, JAXWS_JSE, JAXWS_EJB3, JAXWS_JMS;
};
public enum DeploymentState
Modified:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java 2010-05-20
02:24:07 UTC (rev 12279)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -33,5 +33,8 @@
public abstract Service newService();
- public abstract Endpoint newEndpoint(String targetBean);
+ public abstract Endpoint newHttpEndpoint(String targetBean);
+
+ public abstract Endpoint newJMSEndpoint(String targetBean);
+
}
Modified:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2010-05-20
02:24:07 UTC (rev 12279)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -84,19 +84,7 @@
/** Use the deployment classloader to load the bean */
Class getTargetBeanClass();
-
- /** Get the URL pattern for this endpoint */
- String getURLPattern();
-
- /** Set the URL pattern for this endpoint */
- void setURLPattern(String urlPattern);
-
- /** Get endpoint address */
- String getAddress();
-
- /** Set endpoint address */
- void setAddress(String address);
-
+
/** Set the request handler for this endpoint */
void setRequestHandler(RequestHandler handler);
@@ -132,4 +120,10 @@
/** Returns associated JNDI context with this endpoint. */
Context getJNDIContext();
+
+ /** Get endpoint address */
+ String getAddress();
+
+ /** Set endpoint address */
+ void setAddress(String address);
}
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/HttpEndpoint.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/HttpEndpoint.java
(rev 0)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/HttpEndpoint.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.spi.deployment;
+
+/**
+ * To represents a http transport endpoint
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public interface HttpEndpoint extends Endpoint
+{
+ /** Get the URL pattern for this endpoint */
+ String getURLPattern();
+
+ /** Set the URL pattern for this endpoint */
+ void setURLPattern(String urlPattern);
+
+}
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/JMSEndpoint.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/JMSEndpoint.java
(rev 0)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/deployment/JMSEndpoint.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.spi.deployment;
+
+import java.net.URI;
+
+/**
+ * To represent the jms transport endpoint
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public interface JMSEndpoint extends Endpoint
+{
+ //Set jms target destination
+ void setTargetDestination(String dest);
+
+ //Get jms target destination
+ String getTargetDestination();
+
+ //Set jms reply destination
+ void setReplyDestination(String replyTo);
+
+ //Get jms reply destination
+ String getReplyDestination();
+
+ //Set soap over jms requestURI
+ void setRequestURI(URI uri);
+
+ //Get soap over jms requestURI
+ URI getRequestURI();
+}
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointMetaData.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointMetaData.java
(rev 0)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointMetaData.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.spi.metadata.jms;
+
+/**
+ * JMS Meta data class contains the implementor and address information
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSEndpointMetaData
+{
+ //Endpoint name
+ private String name;
+
+ //port name
+ private String endpointName = "";
+
+ //implementor class
+ private String implementor = "";
+
+ //wsdl location
+ private String wsdlLocation = "";
+
+
+ //parent component
+ private JMSEndpointsMetaData endpointsMetaData = null;
+
+ public JMSEndpointMetaData(JMSEndpointsMetaData endpoints)
+ {
+ endpointsMetaData = endpoints;
+ }
+
+ public JMSEndpointsMetaData getParentMetaData()
+ {
+ return endpointsMetaData;
+ }
+
+ public String getImplementor()
+ {
+ return implementor;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getEndpointName()
+ {
+ return endpointName;
+ }
+
+ public String getWsdlLocation()
+ {
+ return wsdlLocation;
+ }
+
+ public void setImplementor(String implementor)
+ {
+ this.implementor = implementor;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void setEndpointName(String endpointName)
+ {
+ this.endpointName = endpointName;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
+}
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsFactory.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsFactory.java
(rev 0)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsFactory.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.spi.metadata.jms;
+
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * JMS Endpoints OjbectModelFactory
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSEndpointsFactory implements ObjectModelFactory
+{
+ public static final String DESCRIPTOR_FILE = "jbossws-cxf.xml";
+
+ private URL descriptorURL;
+
+ public JMSEndpointsFactory(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing
starts.
+ *
+ * @return the root of the object model.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName,
+ Attributes attrs)
+ {
+ JMSEndpointsMetaData endpointsMetaData = new JMSEndpointsMetaData(descriptorURL);
+ return endpointsMetaData;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(JMSEndpointsMetaData endpoints, UnmarshallingContext navigator,
String namespaceURI,
+ String localName, Attributes attrs)
+ {
+ if ("endpoint".equals(localName) &&
attrs.getValue("transportId").equals("http://cxf.apache.or...)
+ {
+ JMSEndpointMetaData endpoint = new JMSEndpointMetaData(endpoints);
+ endpoint.setName(attrs.getValue("name"));
+ endpoint.setImplementor(attrs.getValue("implementor"));
+ endpoint.setEndpointName(attrs.getValue("endpointName"));
+ endpoint.setWsdlLocation(attrs.getValue("wsdlLocation"));
+ return endpoint;
+
+ }
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JMSEndpointsMetaData endpoints, JMSEndpointMetaData
endpointMetaData, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ endpoints.addEndpointMetaData(endpointMetaData);
+ }
+
+}
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsMetaData.java
===================================================================
---
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsMetaData.java
(rev 0)
+++
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/jms/JMSEndpointsMetaData.java 2010-05-20
02:50:57 UTC (rev 12280)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.spi.metadata.jms;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>Meta data class from jbossws-cxf.xml</p>
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+
+public class JMSEndpointsMetaData
+{
+ //The endpoints list
+ private List<JMSEndpointMetaData> endpointsMetaData = new
ArrayList<JMSEndpointMetaData>();
+
+ private URL descriptorURL;
+
+ public JMSEndpointsMetaData()
+ {
+ }
+
+ public JMSEndpointsMetaData(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ public URL getDescriptorURL()
+ {
+ return descriptorURL;
+ }
+
+ public void addEndpointMetaData(JMSEndpointMetaData endpointMetaData)
+ {
+ endpointsMetaData.add(endpointMetaData);
+ }
+
+ public List<JMSEndpointMetaData> getEndpointsMetaData() {
+ return this.endpointsMetaData;
+ }
+}