Uses of Class
org.nanonative.nano.core.model.Context
Packages that use Context
Package
Description
-
Uses of Context in org.nanonative.nano.core
Fields in org.nanonative.nano.core declared as ContextMethods in org.nanonative.nano.core that return ContextModifier and TypeMethodDescriptionNano.context()Returns the rootContext.Creates aContextspecified class.Nano.contextEmpty(Class<?> clazz) Creates an emptyContextfor the specified class.protected ContextNanoBase.readConfigs(String... args) Reads and initializesContextbased on provided arguments.Methods in org.nanonative.nano.core with parameters of type ContextModifier and TypeMethodDescriptionprotected voidPerforms the exit operation.protected voidNano.gracefulShutdown(Context context) Performs the gracefulShutdown operation.protected NanoShuts down theNanoinstance, ensuring all services and threads are gracefully terminated.protected voidNanoServices.shutdownServices(Context context) Shuts down all registeredServicegracefully.Initiates the shutdown process for theNanoinstance.abstract TInitiates the shutdown process for theNanoinstance.protected TNanoServices.unregisterService(Context context, Service service) Method parameters in org.nanonative.nano.core with type arguments of type ContextModifier and TypeMethodDescriptionprotected SchedulerNanoThreads.asyncFromPool(Supplier<Context> context) Creates aSchedulerfrom the thread pool.protected voidNanoThreads.executeScheduler(Supplier<Context> context, ExRunnable task, Scheduler scheduler, boolean periodically) Executes the task.NanoThreads.run(Supplier<Context> context, ExRunnable task, long delay, long period, TimeUnit unit, BooleanSupplier until) Executes a task periodically, starting after an initial delay.NanoThreads.run(Supplier<Context> context, ExRunnable task, long delay, TimeUnit timeUnit) Executes a task asynchronously after a specified delay.NanoThreads.run(Supplier<Context> context, ExRunnable task, LocalTime atTime, DayOfWeek dow, ZoneId zone, BooleanSupplier until) Core scheduling method for daily or weekly execution at a fixed wall-clock time.NanoThreads.run(Supplier<Context> context, ExRunnable task, LocalTime atTime, DayOfWeek dow, BooleanSupplier until) Executes a task periodically, starting after an initial delay.NanoThreads.runDaily(Supplier<Context> context, ExRunnable task, LocalTime atTime, BooleanSupplier until) Executes a task daily at the specified wall-clock time in the server's default time zone until the stop condition returnstrue.NanoThreads.runWeekly(Supplier<Context> context, ExRunnable task, DayOfWeek dow, LocalTime atTime, BooleanSupplier until) Executes a task weekly at the given day of week and wall-clock time in the server's default time zone until the stop condition returnstrue.protected voidNanoThreads.scheduleOnce(Supplier<Context> context, ExRunnable task, Scheduler scheduler, BooleanSupplier until, LocalTime atTime, DayOfWeek dow, ZoneId zone, ZonedDateTime planned) Internal recursive scheduler: schedules the given task once, then reschedules itself for the next occurrence.protected voidNano.startServicesAndLogger(berlin.yuna.typemap.model.FunctionOrNull<Context, List<Service>> startupServices) Starts and initializes required components.Constructor parameters in org.nanonative.nano.core with type arguments of type ContextModifierConstructorDescriptionNano(berlin.yuna.typemap.model.FunctionOrNull<Context, List<Service>> startupServices, Map<Object, Object> config, String... args) Nano(String[] args, berlin.yuna.typemap.model.FunctionOrNull<Context, List<Service>> startupServices) -
Uses of Context in org.nanonative.nano.core.model
Fields in org.nanonative.nano.core.model declared as ContextMethods in org.nanonative.nano.core.model that return ContextModifier and TypeMethodDescriptionService.context()Gets the current context of the service.static ContextContext.createRootContext(Class<?> clazz) Creates a new root context with a unique trace ID.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Logs a message with the specified log level.Context.newContext(Class<?> clazz) Creates new Context with a new logger and trace ID.Context.newEmptyContext(Class<?> clazz) Creates new empty Context with a new logger and trace ID.Context.parent()Retrieves theContextparent associated with this context.Puts a key-value pair into the context.Associates the specified value with the specified key in this map.Executes one or multipleServiceasynchronously.final ContextContext.run(ExRunnable... runnable) Executes one or multiple runnable asynchronously.Context.run(ExRunnable task, long delay, long period, TimeUnit unit) Executes a task periodically, starting after an initial delay.Context.run(ExRunnable task, long delay, long period, TimeUnit unit, BooleanSupplier until) Executes a task periodically, starting after an initial delay.Context.run(ExRunnable task, long delay, TimeUnit timeUnit) Executes a task asynchronously after a specified delay.Context.run(ExRunnable task, LocalTime atTime) Executes a task periodically, starting after an initial delay.Context.run(ExRunnable task, LocalTime atTime, DayOfWeek dow, ZoneId zone, BooleanSupplier until) Core scheduling method for daily or weekly execution at a fixed wall-clock time.Context.run(ExRunnable task, LocalTime atTime, DayOfWeek dow, BooleanSupplier until) Executes a task periodically, starting after an initial delay.Context.run(ExRunnable task, LocalTime atTime, BooleanSupplier until) Executes a task periodically, starting after an initial delay.Executes asynchronously and waits for allServiceto be readyfinal ContextContext.runAwait(ExRunnable... runnable) Executes asynchronously and waits for all runnable to be readyfinal ContextContext.runAwaitHandled(Consumer<Event<Object, Void>> onFailure, ExRunnable... runnable) Executes asynchronously and waits for all runnable to be readyContext.runDaily(ExRunnable task, LocalTime... atTime) Executes a task daily at the specified wall-clock time in the server's default time zone.Context.runDaily(ExRunnable task, BooleanSupplier until, LocalTime... atTime) Executes a task daily at the specified wall-clock time in the server's default time zone until the stop condition returnstrue.final ContextContext.runHandled(Consumer<Event<Object, Void>> onFailure, ExRunnable... runnable) Executes one or multiple runnable asynchronously.Context.runWeekly(ExRunnable task, LocalTime atTime, DayOfWeek... dow) Executes a task weekly at the given day of week and wall-clock time in the server's default time zone.Context.runWeekly(ExRunnable task, LocalTime atTime, BooleanSupplier until, DayOfWeek... dow) Executes a task weekly at the given day of week and wall-clock time in the server's default time zone until the stop condition returnstrue.Context.sendEventError(Object payloadOrEvent, Throwable throwable) Sends an unhandled event with the provided, nullable payload and exception.Context.sendEventError(Event<?, ?> event, Service service, Throwable throwable) Sends an unhandled event with the provided, nullable payload and exception.<C,R> Context Context.subscribeEvent(Channel<C, R> channel, Consumer<Event<C, R>> listener) Registers an event listener with a typed payload.Logs a message with the specified log level.Logs a message with the specified log level.<C,R> Context Context.unsubscribeEvent(int channelId, Consumer<Event<C, R>> listener) Removes a registered event listener for a specific event payload.<C,R> Context Context.unsubscribeEvent(Channel<C, R> channel, Consumer<Event<C, R>> listener) Removes a registered event listener for a specific event payload.Logs a message with the specified log level.Logs a message with the specified log level.Methods in org.nanonative.nano.core.model with parameters of type ContextModifier and TypeMethodDescriptionSets the context for this service.Service.nanoThread(Context context) Creates and configures a new NanoThread for this service.static NanoThread[]Creates NanoThreads for multiple services.Method parameters in org.nanonative.nano.core.model with type arguments of type ContextConstructors in org.nanonative.nano.core.model with parameters of type Context -
Uses of Context in org.nanonative.nano.helper
Methods in org.nanonative.nano.helper that return ContextModifier and TypeMethodDescriptionstatic Contextstatic ContextNanoUtils.readConfigFile(Context context, String path) static ContextNanoUtils.readConfigFiles(Context context, String profile) static ContextNanoUtils.readProfiles(Context result) static ContextNanoUtils.resolvePlaceHolders(Context context) Methods in org.nanonative.nano.helper with parameters of type ContextModifier and TypeMethodDescriptionstatic Contextstatic ContextNanoUtils.readConfigFile(Context context, String path) static ContextNanoUtils.readConfigFiles(Context context, String profile) static ContextNanoUtils.readProfiles(Context result) static ContextNanoUtils.resolvePlaceHolders(Context context) Method parameters in org.nanonative.nano.helper with type arguments of type ContextModifier and TypeMethodDescriptionstatic voidNanoUtils.handleJavaError(Supplier<Context> context, Throwable error) Handles a Java error by logging it and shutting down the application.static voidNanoUtils.tryExecute(Supplier<Context> context, ExRunnable operation) static voidNanoUtils.tryExecute(Supplier<Context> context, ExRunnable operation, Consumer<Throwable> consumer) -
Uses of Context in org.nanonative.nano.helper.event.model
Fields in org.nanonative.nano.helper.event.model declared as ContextMethods in org.nanonative.nano.helper.event.model that return ContextModifier and TypeMethodDescriptionEvent.context()Returns the context associated with this event.Event.sendR()Sends the event to the Nano instance for processing.Constructors in org.nanonative.nano.helper.event.model with parameters of type Context -
Uses of Context in org.nanonative.nano.services.http
Methods in org.nanonative.nano.services.http with parameters of type ContextModifier and TypeMethodDescriptionstatic voidHttpsHelper.configureHttps(Context context, HttpServer server) Configures SSL/TLS for an existing HTTPS server.static SSLContextHttpsHelper.createCustomTrustedSslContext(Context context, List<Path> paths) static HttpServerHttpsHelper.createDefaultServer(Context context) Creates a default HTTP server using the configured or fallback port.static HttpServerHttpsHelper.createHttpsServer(Context context) Creates an HTTPS server using the configured or fallback port.static CertificateHttpsHelper.readCertificate(Context context, KeyStore keyStore) Reads an X.509 certificate from a file and inserts it into the given key store.static voidHttpsHelper.readKey(Context context, KeyStore keyStore, char[] password, Certificate cert) Reads a private key file (PEM or PKCS#8) and inserts it into the provided key store.static voidLoads all entries from an existing keystore into another keystore. -
Uses of Context in org.nanonative.nano.services.http.model
Methods in org.nanonative.nano.services.http.model with parameters of type ContextModifier and TypeMethodDescriptionSends an HTTP request using the providedHttpObject.HttpObject.send(Context context, Consumer<HttpObject> callback) Sends an HTTP request using the providedHttpObject. -
Uses of Context in org.nanonative.nano.services.metric.logic
Methods in org.nanonative.nano.services.metric.logic with parameters of type ContextModifier and TypeMethodDescriptionvoidMetricService.updateArch(Context context) voidMetricService.updateJavaVersion(Context context) voidvoidMetricService.updateSystemMetrics(Context context) Method parameters in org.nanonative.nano.services.metric.logic with type arguments of type ContextModifier and TypeMethodDescriptionvoidMetricService.updateBufferMetrics(Supplier<Context> context) voidMetricService.updateClassLoaderMetrics(Supplier<Context> context) voidMetricService.updateCpuMetrics(Supplier<Context> context) voidMetricService.updateDeadlockMetrics(Supplier<Context> context) voidMetricService.updateDiscMetrics(Supplier<Context> context) voidMetricService.updateMemoryMetrics(Supplier<Context> context) voidMetricService.updatePoolMetrics(Supplier<Context> context) voidMetricService.updateThreadMetrics(Supplier<Context> context)