Skip to content

Commit

Permalink
Issue #4568 - rename websocket modules and classes to jakarta
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Mar 3, 2020
1 parent cd3e8af commit 4b5c10d
Show file tree
Hide file tree
Showing 452 changed files with 1,029 additions and 1,029 deletions.
2 changes: 1 addition & 1 deletion aggregates/jetty-all/pom.xml
Expand Up @@ -183,7 +183,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion aggregates/jetty-websocket-all/pom.xml
Expand Up @@ -113,7 +113,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/embedded/pom.xml
Expand Up @@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Expand Up @@ -25,7 +25,7 @@
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer;
import org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer;

/**
* Example of setting up a jakarta.websocket server with Jetty embedded
Expand Down Expand Up @@ -56,7 +56,7 @@ public static Server createServer(int port)
handlers.addHandler(context);

// Enable jakarta.websocket configuration for the context
JavaxWebSocketServletContainerInitializer.configure(context,
JakartaWebSocketServletContainerInitializer.configure(context,
(servletContext, serverContainer) ->
{
// Add your websocket to the jakarta.websocket.server.ServerContainer
Expand Down
6 changes: 3 additions & 3 deletions jetty-bom/pom.xml
Expand Up @@ -341,17 +341,17 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-client</artifactId>
<artifactId>websocket-jakarta-client</artifactId>
<version>10.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>10.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-common</artifactId>
<artifactId>websocket-jakarta-common</artifactId>
<version>10.0.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down
Expand Up @@ -139,7 +139,7 @@ Here is an example, setting the context attribute in code (although you can also
----
WebAppContext context = new WebAppContext();
context.setAttribute("org.eclipse.jetty.containerInitializerOrder",
"org.eclipse.jetty.websocket.javax.server.JavaxWebSocketServletContainerInitializer, com.acme.Foo.MySCI, *");
"org.eclipse.jetty.websocket.jakarta.server.JavaxWebSocketServletContainerInitializer, com.acme.Foo.MySCI, *");
----

In this example, we ensure that the `WebSocketServerContainerInitializer` is the very first `ServletContainerInitializer` that is called, followed by MySCI and then any other `ServletContainerInitializer` instances that were discovered but not yet called.
Expand Down
Expand Up @@ -145,7 +145,7 @@ Properties:
jetty.secure.port = 8443
jetty.truststore = etc/keystore
jetty.truststore.password = OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
org.eclipse.jetty.websocket.javax = false
org.eclipse.jetty.websocket.jakarta = false
threads.max = 200
threads.min = 10
threads.timeout = 60000
Expand Down Expand Up @@ -189,8 +189,8 @@ Note: order presented here is how they would appear on the classpath.
32: 1.2 | ${jetty.home}/lib/annotations/javax.annotation-api-1.2.jar
33: {VERSION} | ${jetty.home}/lib/jetty-deploy-{VERSION}.jar
34: 1.0 | ${jetty.home}/lib/websocket/javax.websocket-api-1.0.jar
35: {VERSION} | ${jetty.home}/lib/websocket/websocket-javax-client-{VERSION}.jar
36: {VERSION} | ${jetty.home}/lib/websocket/websocket-javax-server-{VERSION}.jar
35: {VERSION} | ${jetty.home}/lib/websocket/websocket-jakarta-client-{VERSION}.jar
36: {VERSION} | ${jetty.home}/lib/websocket/websocket-jakarta-server-{VERSION}.jar
37: {VERSION} | ${jetty.home}/lib/websocket/websocket-api-{VERSION}.jar
38: {VERSION} | ${jetty.home}/lib/websocket/websocket-client-{VERSION}.jar
39: {VERSION} | ${jetty.home}/lib/websocket/websocket-common-{VERSION}.jar
Expand Down Expand Up @@ -235,7 +235,7 @@ etc/demo-rewrite-rules.xml
# Websocket chat examples needs websocket enabled
# Don't start for all contexts (set to true in test.xml context)
org.eclipse.jetty.websocket.javax=false
org.eclipse.jetty.websocket.jakarta=false
--module=websocket
# Create and configure the test realm
Expand Down
Expand Up @@ -97,9 +97,9 @@ Note: order presented here is how they would appear on the classpath.
31: 4.1 | ${jetty.home}/lib/annotations/asm-commons-4.1.jar
32: 1.2 | ${jetty.home}/lib/annotations/javax.annotation-api-1.2.jar
33: {VERSION} | ${jetty.home}/lib/jetty-deploy-{VERSION}.jar
34: 1.0 | ${jetty.home}/lib/websocket/javax.websocket-api-1.0.jar
35: {VERSION} | ${jetty.home}/lib/websocket/websocket-javax-client-{VERSION}.jar
36: {VERSION} | ${jetty.home}/lib/websocket/websocket-javax-server-{VERSION}.jar
34: 1.0 | ${jetty.home}/lib/websocket/jakarta.websocket-api-1.0.jar
35: {VERSION} | ${jetty.home}/lib/websocket/websocket-jakarta-client-{VERSION}.jar
36: {VERSION} | ${jetty.home}/lib/websocket/websocket-jakarta-server-{VERSION}.jar
37: {VERSION} | ${jetty.home}/lib/websocket/websocket-api-{VERSION}.jar
38: {VERSION} | ${jetty.home}/lib/websocket/websocket-client-{VERSION}.jar
39: {VERSION} | ${jetty.home}/lib/websocket/websocket-common-{VERSION}.jar
Expand Down
Expand Up @@ -108,17 +108,17 @@ To enable Websocket, you need to enable the `websocket` link:#enabling-modules[m
Once this module is enabled for your Jetty base, it will apply to all webapps deployed to that base. If you want to be more selective about which webapps use Websocket, then you can:

Disable Websocket for a particular webapp:::
You can disable jsr-356 for a particular webapp by setting the link:#context_attributes[context attribute] `org.eclipse.jetty.websocket.javax` to `false`.
You can disable jsr-356 for a particular webapp by setting the link:#context_attributes[context attribute] `org.eclipse.jetty.websocket.jakarta` to `false`.
This will mean that websockets are not available to your webapp, however deployment time scanning for websocket-related classes such as endpoints will still occur.
This can be a significant impost if your webapp contains a lot of classes and/or jar files.
To completely disable websockets and avoid all setup costs associated with it for a particular webapp, use instead the context attribute `org.eclipse.jetty.containerInitializerExclusionPattern`, described next, which allows you to exclude the websocket ServletContainerInitializer that causes the scanning.
Completely disable Websocket for a particular webapp:::
Set the `org.eclipse.jetty.containerInitializerExclusionPattern` link:#context_attributes[context attribute] to include `org.eclipse.jetty.websocket.javax.server.JavaxWebSocketServletContainerInitializer`.
Set the `org.eclipse.jetty.containerInitializerExclusionPattern` link:#context_attributes[context attribute] to include `org.eclipse.jetty.websocket.jakarta.server.JavaxWebSocketServletContainerInitializer`.
Here's an example of doing this in code, although you can do the link:#intro-jetty-configuration-webapps[same in xml]:
+
[source, java, subs="{sub-order}"]
----
WebAppContext context = new WebAppContext();
context.setAttribute("org.eclipse.jetty.containerInitializerExclusionPattern",
"org.eclipse.jetty.websocket.javax.server.JavaxWebSocketServletContainerInitializer|com.acme.*");
"org.eclipse.jetty.websocket.jakarta.server.JavaxWebSocketServletContainerInitializer|com.acme.*");
----
2 changes: 1 addition & 1 deletion jetty-home/pom.xml
Expand Up @@ -641,7 +641,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion jetty-maven-plugin/pom.xml
Expand Up @@ -218,7 +218,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml
Expand Up @@ -96,7 +96,7 @@
<Item>org.eclipse.jetty.webapp.JmxConfiguration</Item>
<Item>org.eclipse.jetty.osgi.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.websocket.server.config.JettyWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketConfiguration</Item>
<Item>JavaxWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiMetaInfConfiguration</Item>
</Array>
Expand Down
4 changes: 2 additions & 2 deletions jetty-osgi/test-jetty-osgi/pom.xml
Expand Up @@ -298,7 +298,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-client</artifactId>
<artifactId>websocket-jakarta-client</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
Expand All @@ -321,7 +321,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<artifactId>websocket-jakarta-server</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
Expand Down
Expand Up @@ -82,7 +82,7 @@
<Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
<Item>org.eclipse.jetty.webapp.JmxConfiguration</Item>
<Item>org.eclipse.jetty.websocket.server.config.JettyWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.osgi.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiMetaInfConfiguration</Item>
Expand Down
2 changes: 1 addition & 1 deletion jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml
Expand Up @@ -85,7 +85,7 @@
<Item>org.eclipse.jetty.webapp.JmxConfiguration</Item>
<Item>org.eclipse.jetty.osgi.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.websocket.server.config.JettyWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiMetaInfConfiguration</Item>
</Array>
Expand Down
Expand Up @@ -107,9 +107,9 @@ public void assertAllBundlesActiveOrResolved()
@Test
public void testWebsocket() throws Exception
{
startBundle(bundleContext, "org.eclipse.jetty.websocket.javax.common");
startBundle(bundleContext, "org.eclipse.jetty.websocket.javax.client");
startBundle(bundleContext, "org.eclipse.jetty.websocket.javax.server");
startBundle(bundleContext, "org.eclipse.jetty.websocket.jakarta.common");
startBundle(bundleContext, "org.eclipse.jetty.websocket.jakarta.client");
startBundle(bundleContext, "org.eclipse.jetty.websocket.jakarta.server");
startBundle(bundleContext, "org.eclipse.jetty.tests.webapp");

if (Boolean.getBoolean(TestOSGiUtil.BUNDLE_DEBUG))
Expand Down
Expand Up @@ -154,9 +154,9 @@ public static List<Option> coreJettyDependencies()
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-client").versionAsInProject().start());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-common").versionAsInProject().start());
res.add(mavenBundle().groupId("org.eclipse.jetty.toolchain").artifactId("jetty-jakarta-websocket-api").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-server").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-client").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-common").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jakarta-server").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jakarta-client").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jakarta-common").versionAsInProject().noStart());

res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-boot").versionAsInProject().start());
return res;
Expand Down
8 changes: 4 additions & 4 deletions jetty-websocket/pom.xml
Expand Up @@ -24,10 +24,10 @@
<module>websocket-jetty-server</module>
<module>websocket-jetty-tests</module>
<!-- Javax WebSocket Implementation -->
<module>websocket-javax-common</module>
<module>websocket-javax-client</module>
<module>websocket-javax-server</module>
<module>websocket-javax-tests</module>
<module>websocket-jakarta-common</module>
<module>websocket-jakarta-client</module>
<module>websocket-jakarta-server</module>
<module>websocket-jakarta-tests</module>
</modules>

<build>
Expand Down
Expand Up @@ -8,4 +8,4 @@ websocket

[depend]
websocket-jetty
websocket-javax
websocket-jakarta
Expand Up @@ -7,11 +7,11 @@
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>websocket-javax-client</artifactId>
<artifactId>websocket-jakarta-client</artifactId>
<name>Jetty :: Websocket :: jakarta.websocket :: Client</name>

<properties>
<bundle-symbolic-name>${project.groupId}.javax.client</bundle-symbolic-name>
<bundle-symbolic-name>${project.groupId}.jakarta.client</bundle-symbolic-name>
</properties>

<dependencies>
Expand All @@ -22,7 +22,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-common</artifactId>
<artifactId>websocket-jakarta-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -62,7 +62,7 @@
<instructions>
<Bundle-Description>jakarta.websocket.client Implementation</Bundle-Description>
<Export-Package>
org.eclipse.jetty.websocket.javax.client.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
org.eclipse.jetty.websocket.jakarta.client.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
Expand Down
Expand Up @@ -17,16 +17,16 @@
//

import jakarta.websocket.ContainerProvider;
import org.eclipse.jetty.websocket.javax.client.JavaxWebSocketClientContainerProvider;
import org.eclipse.jetty.websocket.jakarta.client.JakartaWebSocketClientContainerProvider;

module org.eclipse.jetty.websocket.javax.client
module org.eclipse.jetty.websocket.jakarta.client
{
exports org.eclipse.jetty.websocket.javax.client;
exports org.eclipse.jetty.websocket.jakarta.client;

requires transitive org.eclipse.jetty.client;
requires transitive org.eclipse.jetty.websocket.javax.common;
requires transitive org.eclipse.jetty.websocket.jakarta.common;
requires org.eclipse.jetty.websocket.core;
requires org.eclipse.jetty.websocket.util;

provides ContainerProvider with JavaxWebSocketClientContainerProvider;
provides ContainerProvider with JakartaWebSocketClientContainerProvider;
}
Expand Up @@ -16,14 +16,14 @@
// ========================================================================
//

package org.eclipse.jetty.websocket.javax.client;
package org.eclipse.jetty.websocket.jakarta.client;

import java.util.Collections;
import java.util.List;

import jakarta.websocket.ClientEndpoint;
import jakarta.websocket.ClientEndpointConfig;
import org.eclipse.jetty.websocket.javax.common.ClientEndpointConfigWrapper;
import org.eclipse.jetty.websocket.jakarta.common.ClientEndpointConfigWrapper;
import org.eclipse.jetty.websocket.util.InvalidWebSocketException;

public class AnnotatedClientEndpointConfig extends ClientEndpointConfigWrapper
Expand Down
Expand Up @@ -16,9 +16,9 @@
// ========================================================================
//

package org.eclipse.jetty.websocket.javax.client;
package org.eclipse.jetty.websocket.jakarta.client;

import org.eclipse.jetty.websocket.javax.common.ClientEndpointConfigWrapper;
import org.eclipse.jetty.websocket.jakarta.common.ClientEndpointConfigWrapper;

public class BasicClientEndpointConfig extends ClientEndpointConfigWrapper
{
Expand Down
Expand Up @@ -16,7 +16,7 @@
// ========================================================================
//

package org.eclipse.jetty.websocket.javax.client;
package org.eclipse.jetty.websocket.jakarta.client;

import java.util.List;
import java.util.Map;
Expand Down
Expand Up @@ -16,7 +16,7 @@
// ========================================================================
//

package org.eclipse.jetty.websocket.javax.client;
package org.eclipse.jetty.websocket.jakarta.client;

import java.net.URI;
import java.security.Principal;
Expand All @@ -26,14 +26,14 @@
import org.eclipse.jetty.websocket.core.FrameHandler;
import org.eclipse.jetty.websocket.core.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.core.client.WebSocketCoreClient;
import org.eclipse.jetty.websocket.javax.common.JavaxWebSocketFrameHandler;
import org.eclipse.jetty.websocket.javax.common.UpgradeRequest;
import org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketFrameHandler;
import org.eclipse.jetty.websocket.jakarta.common.UpgradeRequest;

public class JavaxClientUpgradeRequest extends ClientUpgradeRequest implements UpgradeRequest
public class JakartaClientUpgradeRequest extends ClientUpgradeRequest implements UpgradeRequest
{
private final JavaxWebSocketFrameHandler frameHandler;
private final JakartaWebSocketFrameHandler frameHandler;

public JavaxClientUpgradeRequest(JavaxWebSocketClientContainer clientContainer, WebSocketCoreClient coreClient, URI requestURI, Object websocketPojo)
public JakartaClientUpgradeRequest(JakartaWebSocketClientContainer clientContainer, WebSocketCoreClient coreClient, URI requestURI, Object websocketPojo)
{
super(coreClient, requestURI);
frameHandler = clientContainer.newFrameHandler(websocketPojo, this);
Expand Down

0 comments on commit 4b5c10d

Please sign in to comment.