Skip to content

Commit

Permalink
Use org.jboss.com.sun.httpserver
Browse files Browse the repository at this point in the history
  • Loading branch information
asoldano committed May 10, 2011
1 parent 61b4f19 commit 09e13a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
12 changes: 9 additions & 3 deletions pom.xml
Expand Up @@ -26,10 +26,11 @@

<!-- Properties -->
<properties>
<jaxws.version>1.0.0.Beta1</jaxws.version>
<jaxws.version>1.0.0.Final</jaxws.version>
<junit.version>4.8.1</junit.version>
<cxf.version>2.3.0</cxf.version>
<servlet-api.version>1.0.0.Beta2</servlet-api.version>
<servlet-api.version>1.0.0.Final</servlet-api.version>
<jboss.httpserver.version>1.0.0.Beta1</jboss.httpserver.version>
</properties>

<!-- Dependencies -->
Expand All @@ -38,7 +39,12 @@
<groupId>org.jboss.spec.javax.xml.ws</groupId>
<artifactId>jboss-jaxws-api_2.2_spec</artifactId>
<version>${jaxws.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.jboss.com.sun.httpserver</groupId>
<artifactId>httpserver</artifactId>
<version>${jboss.httpserver.version}</version>
</dependency>

<!-- test dependencies -->
<dependency>
Expand Down
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* Copyright 2011, 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.
*
Expand Down Expand Up @@ -35,13 +35,12 @@
* @since 22-Aug-2010
*
*/
@SuppressWarnings("restriction")
public class HttpContextDelegate extends HttpContext
{
private com.sun.net.httpserver.HttpContext delegate;
private org.jboss.com.sun.net.httpserver.HttpContext delegate;
private String path;

public HttpContextDelegate(com.sun.net.httpserver.HttpContext delegate, String path)
public HttpContextDelegate(org.jboss.com.sun.net.httpserver.HttpContext delegate, String path)
{
this.delegate = delegate;
this.path = path;
Expand Down Expand Up @@ -70,9 +69,9 @@ public Set<String> getAttributeNames()
@Override
public void setHandler(HttpHandler handler)
{
if (handler instanceof com.sun.net.httpserver.HttpHandler)
if (handler instanceof org.jboss.com.sun.net.httpserver.HttpHandler)
{
delegate.setHandler((com.sun.net.httpserver.HttpHandler) handler);
delegate.setHandler((org.jboss.com.sun.net.httpserver.HttpHandler) handler);
}
else
{
Expand Down
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* Copyright 2011, 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.
*
Expand Down Expand Up @@ -34,8 +34,8 @@
import javax.xml.ws.spi.http.HttpContext;
import javax.xml.ws.spi.http.HttpExchange;

import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsServer;
import org.jboss.com.sun.net.httpserver.HttpServer;
import org.jboss.com.sun.net.httpserver.HttpsServer;

/**
* A javax.xml.ws.spi.http.HttpExchange that delegates
Expand All @@ -45,15 +45,14 @@
* @since 22-Aug-2010
*
*/
@SuppressWarnings("restriction")
public class HttpExchangeDelegate extends HttpExchange
{
private com.sun.net.httpserver.HttpExchange delegate;
private org.jboss.com.sun.net.httpserver.HttpExchange delegate;
private HttpContextDelegate contextDelegate;
private OutputStream wrappeddOutputStream;
private int status;

public HttpExchangeDelegate(com.sun.net.httpserver.HttpExchange delegate)
public HttpExchangeDelegate(org.jboss.com.sun.net.httpserver.HttpExchange delegate)
{
this.delegate = delegate;
}
Expand Down
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* Copyright 2011, 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.
*
Expand All @@ -23,8 +23,8 @@

import java.io.IOException;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import org.jboss.com.sun.net.httpserver.HttpExchange;
import org.jboss.com.sun.net.httpserver.HttpHandler;

/**
* A com.sun.net.httpserver.HttpHandler delegating
Expand All @@ -34,7 +34,6 @@
* @sine 22-Aug-2010
*
*/
@SuppressWarnings("restriction")
public class HttpHandlerDelegate implements HttpHandler {

private javax.xml.ws.spi.http.HttpHandler delegate;
Expand Down
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* Copyright 2011, 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.
*
Expand All @@ -21,7 +21,7 @@
*/
package org.jboss.ws.httpserver_httpspi;

import com.sun.net.httpserver.HttpServer;
import org.jboss.com.sun.net.httpserver.HttpServer;
import javax.xml.ws.spi.http.HttpContext;

/**
Expand All @@ -31,7 +31,6 @@
* @since 22-Aug-2010
*
*/
@SuppressWarnings("restriction")
public class HttpServerContextFactory
{
public static HttpContext createHttpContext(HttpServer server, String contextPath, String path)
Expand Down
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* Copyright 2011, 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.
*
Expand Down Expand Up @@ -43,25 +43,24 @@

/**
* A JAXWS 2.2 Endoint.publish(HttpContext context) API test
* using the JDK6 httpsever as underlying http container
* using the JBoss httpsever as underlying http container
*
* @author alessio.soldano@jboss.com
* @since 22-Aug-2010
*
*/
@SuppressWarnings("restriction")
public class EndpointAPITest extends Assert
{

private static int currentPort = 9876;

private com.sun.net.httpserver.HttpServer server;
private org.jboss.com.sun.net.httpserver.HttpServer server;

@Before
public void setUp() throws IOException
{
currentPort++;
server = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(currentPort), 0);
server = org.jboss.com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(currentPort), 0);
}

@After
Expand Down

0 comments on commit 09e13a2

Please sign in to comment.