Author: richard.opalka(a)jboss.com
Date: 2009-09-29 05:57:43 -0400 (Tue, 29 Sep 2009)
New Revision: 10787
Added:
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfigFactory.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerFactory.java
Removed:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/NettyHttpServerFactory.java
Modified:
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
Log:
[JBWS-2674][JBWS-2754] refactoring (WIP)
Modified:
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
===================================================================
---
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory 2009-09-29
08:31:23 UTC (rev 10786)
+++
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory 2009-09-29
09:57:43 UTC (rev 10787)
@@ -1 +1 @@
-org.jboss.ws.core.jaxws.spi.NettyHttpServerFactory
\ No newline at end of file
+org.jboss.ws.core.jaxws.spi.http.NettyHttpServerFactory
\ No newline at end of file
Added:
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
===================================================================
---
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
(rev 0)
+++
stack/native/branches/ropalka/modules/client/src/main/resources/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory 2009-09-29
09:57:43 UTC (rev 10787)
@@ -0,0 +1 @@
+org.jboss.ws.core.jaxws.spi.http.NettyHttpServerConfigFactory
\ No newline at end of file
Deleted:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/NettyHttpServerFactory.java
===================================================================
---
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/NettyHttpServerFactory.java 2009-09-29
08:31:23 UTC (rev 10786)
+++
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/NettyHttpServerFactory.java 2009-09-29
09:57:43 UTC (rev 10787)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, 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.ws.core.jaxws.spi;
-
-import org.jboss.wsf.spi.http.HttpServer;
-import org.jboss.wsf.spi.http.HttpServerFactory;
-
-/**
- * @see org.jboss.wsf.spi.http.HttpServerFactory
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class NettyHttpServerFactory extends HttpServerFactory
-{
-
- /**
- * Constructor.
- */
- public NettyHttpServerFactory()
- {
- super();
- }
-
- /**
- * Returns Netty based http server.
- *
- * @return Netty based http server
- */
- @Override
- public HttpServer getHttpServer()
- {
- throw new UnsupportedOperationException();
- }
-
-}
Added:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java
===================================================================
---
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java
(rev 0)
+++
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java 2009-09-29
09:57:43 UTC (rev 10787)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.core.jaxws.spi.http;
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+// TODO: review thread safety
+final class NettyHttpServer extends AbstractExtensible implements HttpServer
+{
+
+ /** JBossWS SPI provider. */
+ private static final SPIProvider SPI_PROVIDER =
SPIProviderResolver.getInstance().getProvider();
+ /** JBossWS Http Context factory. */
+ private static final HttpContextFactory HTTP_CONTEXT_FACTORY =
NettyHttpServer.SPI_PROVIDER.getSPI(HttpContextFactory.class);
+
+ public HttpContext createContext(final String contextRoot)
+ {
+ return NettyHttpServer.HTTP_CONTEXT_FACTORY.newHttpContext(this, contextRoot);
+ }
+
+ public void destroy(HttpContext context, Endpoint endpoint)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void publish(HttpContext context, Endpoint endpoint)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void start()
+ {
+ // does nothing
+ }
+
+}
Added:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
===================================================================
---
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
(rev 0)
+++
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2009-09-29
09:57:43 UTC (rev 10787)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.core.jaxws.spi.http;
+
+import java.io.File;
+import java.net.UnknownHostException;
+
+import org.jboss.ws.WSException;
+import org.jboss.wsf.spi.management.ServerConfig;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class NettyHttpServerConfig implements ServerConfig
+{
+
+ // TODO: count with security manager enabled
+ private static File TMP_DIR;
+
+ static
+ {
+ try
+ {
+ TMP_DIR = new File(System.getProperty("java.io.tmpdir"));
+ }
+ catch (SecurityException se)
+ {
+ throw new WSException(se);
+ }
+ }
+
+ public File getHomeDir()
+ {
+ return NettyHttpServerConfig.TMP_DIR;
+ }
+
+ public File getServerDataDir()
+ {
+ return NettyHttpServerConfig.TMP_DIR;
+ }
+
+ public File getServerTempDir()
+ {
+ return NettyHttpServerConfig.TMP_DIR;
+ }
+
+ public String getImplementationTitle()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getImplementationVersion()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getWebServiceHost()
+ {
+ return "localhost";
+ }
+
+ public int getWebServicePort()
+ {
+ return 8686;
+ }
+
+ public int getWebServiceSecurePort()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isModifySOAPAddress()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setModifySOAPAddress(boolean flag)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setWebServiceHost(String host) throws UnknownHostException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setWebServicePort(int port)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setWebServiceSecurePort(int port)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+}
Added:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfigFactory.java
===================================================================
---
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfigFactory.java
(rev 0)
+++
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfigFactory.java 2009-09-29
09:57:43 UTC (rev 10787)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.core.jaxws.spi.http;
+
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class NettyHttpServerConfigFactory extends ServerConfigFactory
+{
+
+ private static ServerConfig NETTY_CONFIG = new NettyHttpServerConfig();
+
+ /**
+ * Constructor.
+ */
+ public NettyHttpServerConfigFactory()
+ {
+ super();
+ }
+
+ @Override
+ public ServerConfig getServerConfig()
+ {
+ return NettyHttpServerConfigFactory.NETTY_CONFIG;
+ }
+
+}
Added:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerFactory.java
===================================================================
---
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerFactory.java
(rev 0)
+++
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerFactory.java 2009-09-29
09:57:43 UTC (rev 10787)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.core.jaxws.spi.http;
+
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.http.HttpServerFactory;
+
+/**
+ * @see org.jboss.wsf.spi.http.HttpServerFactory
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class NettyHttpServerFactory extends HttpServerFactory
+{
+
+ private static final HttpServer NETTY_HTTP_SERVER = new NettyHttpServer();
+
+ /**
+ * Constructor.
+ */
+ public NettyHttpServerFactory()
+ {
+ super();
+ }
+
+ /**
+ * Returns Netty based http server.
+ *
+ * @return Netty based http server
+ */
+ @Override
+ public HttpServer getHttpServer()
+ {
+ return NettyHttpServerFactory.NETTY_HTTP_SERVER;
+ }
+
+}