/** * Reload the hosted Jersey application using the current {@link ResourceConfig * configuration}. */ @Override public void reload() { reload(getConfiguration()); }
@Override public void handle(Void event) { end(); } });
@Override public ContainerResponseWriter get( HttpServerRequest vertxRequest, ContainerRequest jerseyRequest) { return new VertxResponseWriter(vertxRequest, vertx, responseProcessors, postResponseProcessors); }
/** * Reload the hosted Jersey application using a new {@link ResourceConfig * configuration}. * * @param configuration new configuration used for the reload. */ @Override public void reload(ResourceConfig configuration) { ApplicationHandler applicationHandler = new ApplicationHandler(configuration, null, locator); applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler); getApplicationHandler().onReload(this); applicationHandler.onStartup(this); }
@Override protected WhenJerseyServer getWhenJerseyServer() { ContainerResponseWriterProvider provider = new VertxResponseWriterProvider( vertx, new ArrayList<>(), new ArrayList<>()); DefaultJerseyOptions options = new DefaultJerseyOptions(vertx); VertxContainer container = new DefaultVertxContainer(vertx, options, null, null); JerseyHandler handler = new DefaultJerseyHandler(() -> container, provider, new ArrayList<>()); JerseyServer server = new DefaultJerseyServer(handler, container, () -> options); When when = WhenFactory.createSync(); return new DefaultWhenJerseyServer(vertx, () -> server, when); }
@Override public ApplicationHandlerDelegate getApplicationHandlerDelegate() { if (applicationHandlerDelegate == null) { ResourceConfig rc = createConfiguration(); ApplicationHandler applicationHandler = new ApplicationHandler(rc, null, locator); applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler); } return applicationHandlerDelegate; }
/** * Returns the Jersey {@link org.glassfish.jersey.server.ApplicationHandler} instance * * @return the application handler instance */ @Override public ApplicationHandlerDelegate getApplicationHandler() { ApplicationHandler handler = new ApplicationHandler(getResourceConfig(), null, locator); return new DefaultApplicationHandlerDelegate(handler); }
/** * {@inheritDoc} */ @Override public void setSuspendTimeout(long timeOut, TimeUnit timeUnit) throws IllegalStateException { if (timeoutHandler == null) { throw new IllegalStateException("The timeoutHandler is null"); } suspend(timeOut, timeUnit, timeoutHandler); }
/** * {@inheritDoc} */ @Override public void write(int b) throws IOException { checkState(); buffer.appendByte((byte) b); }
/** * {@inheritDoc} */ @Override public WriteStreamOutput exceptionHandler(Handler<Throwable> handler) { checkResponseSet(); response.exceptionHandler(handler); return this; }
/** * Gets the {@link HttpServerOptions} used to set up the vert.x http server * * @return */ @Override public HttpServerOptions getServerOptions() { if (serverOptions == null) { serverOptions = createServerOptions(); } return serverOptions; }
/** * Reload the hosted Jersey application using a new {@link ResourceConfig * configuration}. * * @param configuration new configuration used for the reload. */ @Override public void reload(ResourceConfig configuration) { ApplicationHandler applicationHandler = new ApplicationHandler(configuration, null, locator); applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler); getApplicationHandler().onReload(this); applicationHandler.onStartup(this); }
@Override public ContainerResponseWriter get( HttpServerRequest vertxRequest, ContainerRequest jerseyRequest) { return new VertxResponseWriter(vertxRequest, vertx, container, responseProcessors, postResponseProcessors); }
/** * Reload the hosted Jersey application using the current {@link ResourceConfig * configuration}. */ @Override public void reload() { reload(getConfiguration()); }
@Override public ApplicationHandlerDelegate getApplicationHandlerDelegate() { if (applicationHandlerDelegate == null) { ResourceConfig rc = createConfiguration(); ApplicationHandler applicationHandler = new ApplicationHandler(rc, null, locator); applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler); } return applicationHandlerDelegate; }
/** * {@inheritDoc} */ @Override public void commit() { // End the vertx response if not a write stream if (!isWriteStream) { end(); } }
/** * Gets the {@link HttpServerOptions} used to set up the vert.x http server * * @return */ @Override public HttpServerOptions getServerOptions() { if (serverOptions == null) { serverOptions = createServerOptions(); } return serverOptions; }
@Override public ContainerResponseWriter get( HttpServerRequest vertxRequest, ContainerRequest jerseyRequest) { return new VertxResponseWriter(vertxRequest, vertx, responseProcessors, postResponseProcessors); }
/** * {@inheritDoc} */ @Override public void commit() { // End the vertx response if not a write stream if (!isWriteStream) { end(); } }
/** * {@inheritDoc} */ @Override public void commit() { // End the vertx response if not a write stream if (!isWriteStream) { end(); } }