Skip to content

Commit

Permalink
feat: introduces jakarta servlet 6.0 protocol module (#448)
Browse files Browse the repository at this point in the history
* feat: introduces jakarta servlet 6.0 protocol module
* Class renamed to avoid ambiguity

---------

Signed-off-by: Vladimir V. Bychkov <[email protected]>
Co-authored-by: Scott M Stark <[email protected]>
  • Loading branch information
bvfalcon and starksm64 authored May 2, 2023
1 parent 2302d73 commit 8d3601d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 6 deletions.
6 changes: 3 additions & 3 deletions protocols/servlet-jakarta/README.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= Jakarta EE 9 Servlet 5 API Protocol
= Jakarta EE 9 Servlet 5 and Jakarta EE 10 Servlet 6 API Protocols

This is a port of the servlet protocol handler for communicating using a servlet / http following the Jakarta Servlet 5.x spec.
This is a port of the servlet protocol handler for communicating using a servlet / http following the Jakarta Servlet 5.x-6.x specs.

== Issues
This relies on a release of org.eclipse.jetty:jetty-server that supports the Jakarta Servlet 5.x spec. The current
This relies on a release of org.eclipse.jetty:jetty-server that supports the Jakarta Servlet 5.x-6.x specs. The current
11.0.0-alpha0 release in turn requires Java 11, so this module required Java 8 to compile the module artifact, but
it requires Java 11 to build and run the modules tests.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
* @author <a href="mailto:[email protected]">Aslak Knutsen</a>
* @version $Revision: $
*/
public class Servlet5Extension implements LoadableExtension {
public class ServletExtension implements LoadableExtension {
@Override
public void register(ExtensionBuilder builder) {
builder.service(Protocol.class, org.jboss.arquillian.protocol.servlet5.v_5.ServletProtocol.class);
builder.service(Protocol.class, org.jboss.arquillian.protocol.servlet5.v_5.ServletProtocol.class)
.service(Protocol.class, org.jboss.arquillian.protocol.servlet5.v_6.ServletProtocol.class);

if (Validate.classExists("jakarta.servlet.ServletContext")) {
builder.service(ResourceProvider.class, ServletContextResourceProvider.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2022 Red Hat Inc. and/or its affiliates and other contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.arquillian.protocol.servlet5.v_6;

import org.jboss.arquillian.container.test.spi.client.deployment.DeploymentPackager;
import org.jboss.arquillian.protocol.servlet5.BaseServletProtocol;
import org.jboss.arquillian.protocol.servlet5.v_5.ServletProtocolDeploymentPackager;

/**
* ServletProtocol
*
* @author <a href="mailto:[email protected]">Vladimir Bychkov</a>
*/
public class ServletProtocol extends BaseServletProtocol {
public static final String PROTOCOL_NAME = "Servlet 6.0";

@Override
protected String getProtocolName() {
return PROTOCOL_NAME;
}

/* (non-Javadoc)
* @see org.jboss.arquillian.spi.client.protocol.Protocol#getPackager()
*/
@Override
public DeploymentPackager getPackager() {
return new ServletProtocolDeploymentPackager();
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.jboss.arquillian.protocol.servlet5.Servlet5Extension
org.jboss.arquillian.protocol.servlet5.ServletExtension

0 comments on commit 8d3601d

Please sign in to comment.