Skip to content

Commit

Permalink
Add first implementations of new JAX-RS 3.1 APIs
Browse files Browse the repository at this point in the history
(cherry picked from commit 9134fa8)
  • Loading branch information
geoand authored and actions-user committed Sep 15, 2022
1 parent 1ac7483 commit 7bfb03f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.jboss.resteasy.reactive.common.jaxrs;

import jakarta.ws.rs.SeBootstrap;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.CacheControl;
import jakarta.ws.rs.core.Cookie;
import jakarta.ws.rs.core.EntityPart;
import jakarta.ws.rs.core.EntityTag;
import jakarta.ws.rs.core.Link;
import jakarta.ws.rs.core.MediaType;
Expand All @@ -14,6 +16,7 @@
import java.util.Date;
import java.util.Locale;
import java.util.ServiceLoader;
import java.util.concurrent.CompletionStage;
import org.jboss.resteasy.reactive.RestResponse;
import org.jboss.resteasy.reactive.RestResponse.ResponseBuilder;
import org.jboss.resteasy.reactive.common.core.ResponseBuilderFactory;
Expand Down Expand Up @@ -113,4 +116,30 @@ public <T> HeaderDelegate<T> createHeaderDelegate(Class<T> type) throws IllegalA
public Link.Builder createLinkBuilder() {
return new LinkBuilderImpl();
}

@Override
public SeBootstrap.Configuration.Builder createConfigurationBuilder() {
// RR does not implement currently implement the bootstrapping API
throw new UnsupportedOperationException("Pending implementation");
}

@Override
public CompletionStage<SeBootstrap.Instance> bootstrap(Application application,
SeBootstrap.Configuration configuration) {
// RR does not implement currently implement the bootstrapping API
throw new UnsupportedOperationException("Pending implementation");
}

@Override
public CompletionStage<SeBootstrap.Instance> bootstrap(Class<? extends Application> aClass,
SeBootstrap.Configuration configuration) {
// RR does not implement currently implement the bootstrapping API
throw new UnsupportedOperationException("Pending implementation");
}

@Override
public EntityPart.Builder createEntityPartBuilder(String s) throws IllegalArgumentException {
// TODO: figure out how to implement this
throw new UnsupportedOperationException("Pending implementation");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,20 @@ private void checkClosed() {
}

@Override
public synchronized void close() {
public void close() {
close(true);
}

@Override
public synchronized void close(boolean cascading) {
if (isClosed)
return;
isClosed = true;
for (SseEventSink sink : sinks) {
// this will in turn fire close events to our listeners
sink.close();
if (cascading) {
for (SseEventSink sink : sinks) {
// this will in turn fire close events to our listeners
sink.close();
}
}
}

Expand Down

0 comments on commit 7bfb03f

Please sign in to comment.