/** * The http web server port * * @return the http web server port to listen to */ @Override public int getPort() { checkState(); return config.getInteger(CONFIG_PORT, 80); }
/** * 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); }
/** * The TCP receive buffer size for connections in bytes * * @return buffer size in bytes */ @Override public Integer getReceiveBufferSize() { checkState(); return config.getInteger(CONFIG_RECEIVE_BUFFER_SIZE); }
/** * The http web server host * * @return the http web server host to listen to */ @Override public String getHost() { checkState(); return config.getString(CONFIG_HOST, "0.0.0.0"); }
/** * The accept backlog * * @return the accept backlog */ @Override public int getAcceptBacklog() { checkState(); return config.getInteger(CONFIG_BACKLOG_SIZE, 10000); }
/** * The max body size in bytes when reading the vert.x input stream * * @return the max body size bytes */ @Override public int getMaxBodySize() { checkState(); return config.getNumber(CONFIG_MAX_BODY_SIZE, DEFAULT_MAX_BODY_SIZE).intValue(); }
/** * Returns the base URI used by Jersey * * @return base URI */ @Override public URI getBaseUri() { checkState(); String basePath = config.getString(CONFIG_BASE_PATH, "/"); if (!basePath.endsWith("/")) { basePath += "/"; } return URI.create(basePath); }
protected ResourceConfig getResourceConfig() { checkState(); JsonArray resources = config.getArray(CONFIG_RESOURCES, null);