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 aContextwithNanoLoggerfor the specified class.Nano.contextEmpty(Class<?> clazz) Creates an emptyContextwithNanoLoggerfor 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 TypeMethodDescriptionNano.sendEvent(int channelId, Context context, Object payload, Consumer<Object> responseListener, boolean broadcast) Sends an event with the specified parameters, either broadcasting it to all listeners or sending it to a targeted listener asynchronously if a response listener is provided.Nano.sendEventReturn(int channelId, Context context, Object payload, Consumer<Object> responseListener, boolean broadCast) Processes an event with the given parameters and decides on the execution path based on the presence of a response listener and the broadcast flag.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) 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, BooleanSupplier until) Executes a task periodically, starting after an initial delay.protected voidNano.startServices(berlin.yuna.typemap.model.FunctionOrNull<Context, List<Service>> startupServices) 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 TypeMethodDescriptionContext.broadcastEvent(int channelId, Object payload) Broadcasts an event of the specified type with the provided payload to all listeners within this context without expecting a response.Context.broadcastEvent(int channelId, Object payload, Consumer<Object> responseListener) Broadcasts an event of the specified type with the provided payload to all listeners within this context, expecting a response that is handled by the provided responseListener.NanoThread.context()Unhandled.context()Returns the value of thecontextrecord component.static ContextContext.createRootContext(Class<?> clazz) Creates a new root context with a unique trace ID.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, 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<Unhandled> onFailure, ExRunnable... runnable) Executes asynchronously and waits for all runnable to be readyfinal ContextContext.runHandled(Consumer<Unhandled> onFailure, ExRunnable... runnable) Executes one or multiple runnable asynchronously.Sends an event of the specified type with the provided payload within this context without expecting a response.Sends an event of the specified type with the provided payload within this context, expecting a response that is handled by the provided responseListener.Context.sendEventError(Object payload, 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.Context.subscribeEvent(int channelId, Consumer<Event> listener) Registers an event listener for a specific event type.Context.unsubscribeEvent(int channelId, Consumer<Event> listener) Removes a registered event listener for a specific event type.Methods in org.nanonative.nano.core.model with parameters of type ContextMethod parameters in org.nanonative.nano.core.model with type arguments of type ContextModifier and TypeMethodDescriptionNanoThread.run(ExecutorService executor, Supplier<Context> context, ExRunnable task) abstract voidabstract voidConstructors 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 ContextConstructors in org.nanonative.nano.helper.event.model with parameters of type Context -
Uses of Context in org.nanonative.nano.helper.logger.logic
Method parameters in org.nanonative.nano.helper.logger.logic with type arguments of type Context -
Uses of Context in org.nanonative.nano.services.http
Fields in org.nanonative.nano.services.http declared as ContextMethod parameters in org.nanonative.nano.services.http with type arguments of type Context -
Uses of Context in org.nanonative.nano.services.http.logic
Fields in org.nanonative.nano.services.http.logic declared as ContextMethods in org.nanonative.nano.services.http.logic that return ContextModifier and TypeMethodDescriptionHttpClient.context()Returns the context used for configuring thisHttpClient.Constructors in org.nanonative.nano.services.http.logic with parameters of type ContextModifierConstructorDescriptionHttpClient(Context context) Constructs a newHttpClientwith the provided context.HttpClient(Context context, HttpClient client) Constructs a newHttpClientwith the optional provided context and customHttpClient. -
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
Method parameters in org.nanonative.nano.services.metric.logic with type arguments of type ContextModifier and TypeMethodDescriptionvoidvoidvoidMetricService.updateArch(Supplier<Context> context) voidMetricService.updateBufferMetrics(Supplier<Context> context) voidMetricService.updateClassLoaderMetrics(Supplier<Context> context) voidMetricService.updateCpuMetrics(Supplier<Context> context) voidMetricService.updateDiscMetrics(Supplier<Context> context) voidMetricService.updateJavaVersion(Supplier<Context> context) voidMetricService.updateMemoryMetrics(Supplier<Context> context) voidvoidMetricService.updatePoolMetrics(Supplier<Context> context) voidMetricService.updateSystemMetrics(Supplier<Context> context) voidMetricService.updateThreadMetrics(Supplier<Context> context)