docs: @FFDCIgnore({WebApplicationException.class, IOException.class, NoSuitableMessageBodyWriterException.class})
      @Override
      public CompletionStage<?> send(OutboundSseEvent event) {
          final CompletableFuture<?> future = new CompletableFuture<>();
  
          if (!closed) {
              if (writer != null) {
                  ByteArrayOutputStream os = null;
                  try {
                      os = new ByteArrayOutputStream();
                      writer.writeTo(event, event.getClass(), null, new Annotation [] {}, event.getMediaType(), null, os);
  
                      String eventContents = os.toString();
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "send - sending " + eventContents);
                      }
  
                      if (!response.isCommitted()) {
                          response.setHeader("Content-Type", MediaType.SERVER_SENT_EVENTS);
                          response.flushBuffer();
                      }
  
                      //TODO: this seems like a bug, but most SSE clients seem to expect a named event
                      //      so for now, we will provide one if one is not provided by the user
                      if (event.getName() == null) {
                          response.getOutputStream().print("    UnnamedEvent\n");
                      }
                      response.getOutputStream().println(eventContents);
                      response.getOutputStream().flush();
  
                      return CompletableFuture.completedFuture(eventContents);
                  } catch (NoSuitableMessageBodyWriterException ex) {
                      handleException(ex, future, event);
                      throw new IllegalArgumentException("No suitable message body writer for OutboundSseEvent created with data " + event.getData() + " and mediaType " + event.getMediaType() + ". The data contained within the OutboundSseEvent must match the mediaType."); 
                  } catch (WebApplicationException ex) {
                      handleException(ex, future, event);
                  } catch (IOException ex) {
                      handleException(ex, future, event);
                  } finally {
                      if (os != null) {
                          try {
                              os.close();
                          } catch (IOException ex) {
                              //ignore
                          }
                      }
                  }
              } else {  //no writer
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "No MessageBodyWriter - returning null for event:  " + event);
                  }
                  future.complete(null);
              }  
          } else {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "SseEventSink is closed - failed sending event:  " + event);
              }
              throw new IllegalStateException("SseEventSink is closed.");  
          }
  
          return future;
      }