MCPcopy Create free account

hub / github.com/NanoNative/nano / functions

Functions670 in github.com/NanoNative/nano

↓ 178 callersMethodof
Create a file change event without group information
src/main/java/org/nanonative/nano/services/file/FileChangeEvent.java:24
↓ 156 callersMethodcontext
Returns the root {@link Context}. This context should be only used to manipulate values. {@link Nano#context} should be used for running Lambdas, {@li
src/main/java/org/nanonative/nano/core/Nano.java:160
↓ 101 callersMethodfilter
Applies a predicate to this event and returns a {@link Type} wrapper containing either this event (when the predicate passes) or {@code null}. <p> The
src/main/java/org/nanonative/nano/helper/event/model/Event.java:345
↓ 86 callersMethodsend
Sends the event to the Nano instance for processing. @return self for chaining
src/main/java/org/nanonative/nano/helper/event/model/Event.java:380
↓ 84 callersMethodheader
Retrieves the value of a specified header. @param key the key of the header to retrieve. @return the value of the header, or {@code null} if the head
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:580
↓ 72 callersMethodwaitForStop
This method blocks the current thread for max 10 seconds until the {@link Nano} instance is no longer ready. This is useful in tests for ensuring that
src/main/java/org/nanonative/nano/core/Nano.java:213
↓ 67 callersMethodpath
Retrieves the current path of the {@link HttpObject} without last '/'. @return the request path.
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:321
↓ 63 callersMethodnewEvent
Creates a new {@link Event} instance with the specified event payload. @param channel The {@link Channel} for the event. @return An instance of {@lin
src/main/java/org/nanonative/nano/core/model/Context.java:832
↓ 61 callersMethodgaugeSet
(final String name, final double value)
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:64
↓ 61 callersMethodstop
Initiates the shutdown process for the {@link Nano} instance. @param clazz class for which the {@link Context} is to be created. @return The current
src/main/java/org/nanonative/nano/core/Nano.java:190
↓ 55 callersMethodheaderMap
Returns the HTTP headers map. @return a {@link TypeMap} containing the headers.
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:693
↓ 54 callersMethodbody
Returns a string representation of the body, decoded using the {@link Charset} from {@link HttpObject#encoding()} specified in the {@link HttpHeaders#
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:391
↓ 54 callersMethodstatusCode
Sets the HTTP status code for the {@link HttpObject}. @param statusCode the HTTP status code to set. @return this {@link HttpObject} to allow method
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:674
↓ 52 callersMethodvalue
()
src/main/java/org/nanonative/nano/services/http/model/ContentType.java:41
↓ 47 callersMethodput
Puts a key-value pair into the context. @param key The key to put into the context. Null keys are interpreted as empty strings. @param value The va
src/main/java/org/nanonative/nano/core/model/Context.java:378
↓ 47 callersMethodputR
Associates the specified value with the specified key in this map. @param key the key with which the specified value is to be associated. @param va
src/main/java/org/nanonative/nano/core/model/Context.java:392
↓ 46 callersMethodsize
<p> Calculates the size of the HTTP content. This method first attempts to retrieve the content size from the HTTP headers. It checks the {@code Conte
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:779
↓ 43 callersMethodequals
Two events are equal when their underlying map content is equal and they share the same channel, context, listener, and payload supplier.
src/main/java/org/nanonative/nano/helper/event/model/Event.java:419
↓ 42 callersMethodpathMatch
<p> Checks if the current {@link HttpObject#path()} matches a specified expression. The expression may include: <ul> <li>Path variables enclosed i
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:525
↓ 41 callersMethodsubscribeEvent
Registers an event listener with a typed payload. @param channel The channel to be subscribed. @param listener The bi-consumer to receive the {@link
src/main/java/org/nanonative/nano/core/NanoBase.java:148
↓ 36 callersMethodpayload
Sets the payload of the event. @param payload The data or object that is associated with this event. This can be any relevant information that needs
src/main/java/org/nanonative/nano/helper/event/model/Event.java:95
↓ 35 callersMethodchannel
Returns the name of the {@link Channel}. @return the name of the {@link Channel}.
src/main/java/org/nanonative/nano/helper/event/model/Event.java:50
↓ 35 callersMethodhasContentType
(final String... contentTypes)
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:1284
↓ 34 callersMethodaccept
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:224
↓ 34 callersMethodname
Returns the simple name of the service class. This method provides a default naming convention for services. Can be overridden if a custom naming sche
src/main/java/org/nanonative/nano/core/model/Service.java:119
↓ 32 callersMethodbodyAsString
Returns a string representation of the {@link HttpObject#body()}, decoded using the {@link Charset} from {@link HttpObject#encoding()} specified in th
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:346
↓ 31 callersMethodcontentType
Retrieves the first content types specified in the {@link HttpHeaders#CONTENT_TYPE} header. @return the primary {@link ContentType} of the request, o
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:164
↓ 31 callersMethodregisterConfig
Registers a configuration key with its description. <p> If the key is valid and non-null, it will be standardized and added to the configuration keys
src/main/java/org/nanonative/nano/helper/config/ConfigRegister.java:29
↓ 30 callersMethodrespond
Completes the event with a response and marks it as acknowledged. <p> If a listener is present, it is invoked with the response. Acknowledgement is al
src/main/java/org/nanonative/nano/helper/event/model/Event.java:280
↓ 29 callersMethodrun
()
src/main/java/org/nanonative/nano/helper/ExRunnable.java:5
↓ 28 callersMethoderror
Logs a message with the specified log level. @param message The message to log. @param params The parameters to replace in the message. @return self
src/main/java/org/nanonative/nano/core/model/Context.java:205
↓ 28 callersMethodshutdown
Shuts down the {@link Nano} instance, ensuring all services and threads are gracefully terminated. @param clazz class for which the {@link Context} i
src/main/java/org/nanonative/nano/core/Nano.java:299
↓ 27 callersMethodawait
(final CountDownLatch latch)
src/test/java/org/nanonative/nano/core/config/TestConfig.java:36
↓ 27 callersMethodcreateResponse
Creates and returns a new instance of {@link HttpObject}. This method is typically used to prepare a fresh response object in the context of HTTP hand
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:917
↓ 27 callersMethodisReady
Checks whether the instance is ready for operations. @return readiness state.
src/main/java/org/nanonative/nano/core/NanoBase.java:255
↓ 27 callersMethodmethodType
Returns the current HTTP method of this object. @return the current {@link HttpMethod}.
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:134
↓ 27 callersMethodtryExecute
(final ExRunnable operation)
src/main/java/org/nanonative/nano/core/model/Context.java:928
↓ 23 callersMethodpayloadOpt
Returns the resolved payload if present. @return optional payload
src/main/java/org/nanonative/nano/helper/event/model/Event.java:116
↓ 22 callersMethodid
Performs the id operation. @return the result
src/main/java/org/nanonative/nano/core/model/Scheduler.java:43
↓ 21 callersMethodcreateCorsResponse
Creates and returns a new instance of {@link HttpObject}. If CORS handling is requested, it delegates to the CORS response method. @return a new {@li
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:927
↓ 20 callersMethodaddress
()
src/main/java/org/nanonative/nano/services/http/HttpServer.java:64
↓ 19 callersMethodfailure
Retrieves the failure exception from the HTTP headers, if present. This method directly accesses the headers to pull out a {@link Throwable} object wh
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:1143
↓ 19 callersMethodnano
Retrieves the {@link Nano} instance associated with this context. @return The {@link Nano} instance associated with this context.
src/main/java/org/nanonative/nano/core/model/Context.java:119
↓ 19 callersMethodservice
Retrieves a {@link Service} of a specified payload. @param <S> The payload of the service to retrieve, which extends {@link Service}. @param
src/main/java/org/nanonative/nano/core/model/Context.java:879
↓ 18 callersMethodbodyAsJson
Returns a {@link TypeInfo} representation of the {@link HttpObject#body()}, decoded using the {@link Charset} from {@link HttpObject#encoding()} speci
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:355
↓ 18 callersMethodsplit
(final String input, final String delimiter)
src/main/java/org/nanonative/nano/helper/NanoUtils.java:148
↓ 17 callersMethodtraceId
Retrieves the last created trace ID of the context. @return The last created trace ID of the context.
src/main/java/org/nanonative/nano/core/model/Context.java:143
↓ 15 callersMethodasync
Sets the event to asynchronous mode, allowing the response to be handled by a listener. @return self for chaining
src/main/java/org/nanonative/nano/helper/event/model/Event.java:73
↓ 15 callersMethodbroadcast
Sets the broadcast flag. @param broadcast whether the event should be treated as broadcast @return this event for chaining
src/main/java/org/nanonative/nano/helper/event/model/Event.java:220
↓ 15 callersMethodwriteCfg
(String name, String content)
src/test/java/org/nanonative/nano/core/NanoConfigLoadingTest.java:338
↓ 14 callersMethodlog
Logs a message with the specified log level. @param level The log level to use. @param message The message to log. @param params The parameters to
src/main/java/org/nanonative/nano/core/model/Context.java:321
↓ 14 callersMethodregisterChannelId
Registers a new {@link Channel} with a given name if it does not already exist. If the {@link Channel} payload already exists, it returns the existing
src/main/java/org/nanonative/nano/helper/event/model/Channel.java:24
↓ 13 callersMethodbelongsToGroup
Check if this event belongs to a specific group
src/main/java/org/nanonative/nano/services/file/FileChangeEvent.java:66
↓ 13 callersMethodforFilesWithGroup
Create a watch request for multiple files with specified group
src/main/java/org/nanonative/nano/services/file/FileWatchRequest.java:44
↓ 12 callersMethodpollMatching
( final BlockingQueue<FileChangeEvent> queue, final long timeoutMs, final Predicate<Fi
src/test/java/org/nanonative/nano/services/file/FileWatcherTest.java:288
↓ 12 callersMethodregisterChannelId
Registers a new {@link Channel} with a given name if it does not already exist. If the {@link Channel} payload already exists, it returns the existing
src/main/java/org/nanonative/nano/core/model/Context.java:855
↓ 11 callersMethodassertWorkingHttpClient
(final HttpClient client)
src/test/java/org/nanonative/nano/services/http/logic/HttpClientTest.java:191
↓ 11 callersMethodcontentTypes
Retrieves a list of all content types specified in the {@link HttpHeaders#CONTENT_TYPE} header. @return a list of {@link ContentType} objects represe
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:173
↓ 11 callersMethodputR
Puts the key/value into the underlying map and returns {@code this} for fluent chaining. @param key map key @param value map value @return this eve
src/main/java/org/nanonative/nano/helper/event/model/Event.java:330
↓ 11 callersMethodservices
Retrieves a list of services of a specified payload. @param <S> The payload of the service to retrieve, which extends {@link Service}. @para
src/main/java/org/nanonative/nano/core/model/Context.java:891
↓ 10 callersMethodacceptLanguages
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:292
↓ 10 callersMethodaccepts
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:229
↓ 10 callersMethodacknowledge
Marks the event as acknowledged without providing a response body. <p> Shorthand for {@code respond(null)}. <p> <b>Warning:</b> Acknowledging an event
src/main/java/org/nanonative/nano/helper/event/model/Event.java:198
↓ 10 callersMethoddebug
Logs a message with the specified log level. @param message The message to log. @param params The parameters to replace in the message. @return self
src/main/java/org/nanonative/nano/core/model/Context.java:274
↓ 10 callersMethodgetResourcePath
(String resource)
src/test/java/org/nanonative/nano/services/http/HttpServerTest.java:480
↓ 10 callersMethodisCreate
Check if this is a creation event
src/main/java/org/nanonative/nano/services/file/FileChangeEvent.java:45
↓ 10 callersMethodsorted
()
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:34
↓ 9 callersMethoddoOnStop
()
src/test/java/org/nanonative/nano/model/TestService.java:127
↓ 9 callersMethodgetEvent
(final Channel<C, R> channel)
src/test/java/org/nanonative/nano/model/TestService.java:47
↓ 9 callersMethodpurgeAllDirs
()
src/test/java/org/nanonative/nano/core/NanoConfigLoadingTest.java:330
↓ 9 callersMethodsend
Sends an HTTP request using the provided {@link HttpObject} or {@link HttpRequest}. For async processing, use the {@link HttpClient#send(HttpRequest,
src/main/java/org/nanonative/nano/services/http/HttpClient.java:103
↓ 9 callersMethodwaitFor
Blocks until all provided {@code NanoThread} instances have completed execution. This method waits indefinitely for all threads to finish. @param thr
src/main/java/org/nanonative/nano/core/model/NanoThread.java:132
↓ 8 callersMethodcreateRootContext
Creates a new root context with a unique trace ID. @return The newly created root context.
src/main/java/org/nanonative/nano/core/model/Context.java:110
↓ 8 callersMethodencoding
Retrieves the character set encoding from the {@link HttpHeaders#CONTENT_TYPE} header. @return a {@link Charset} object representing the encoding spe
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:1274
↓ 8 callersMethodinfo
Logs a message with the specified log level. @param message The message to log. @param params The parameters to replace in the message. @return self
src/main/java/org/nanonative/nano/core/model/Context.java:251
↓ 8 callersMethodlisteners
Retrieves the registered event listeners. @return A map of event types to their respective listeners.
src/main/java/org/nanonative/nano/core/NanoBase.java:135
↓ 8 callersMethodport
()
src/main/java/org/nanonative/nano/services/http/HttpServer.java:68
↓ 8 callersMethodputEntry
Adds escaped and converted key-value pairs to the map. @param jsonMap The map to store the key-value pairs. @param key key @param value value
src/main/java/org/nanonative/nano/services/logging/LogFormatterJson.java:112
↓ 8 callersMethodqueryParams
Retrieves all query parameters from the current {@link HttpObject}. @return a {@link TypeMap} containing all the query parameters.
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:472
↓ 8 callersMethodresolveWallTime
DST-safe wall time: pushes through gaps, picks the earlier offset in overlaps.
src/main/java/org/nanonative/nano/core/NanoThreads.java:203
↓ 8 callersMethodwaitForCondition
Waits for a condition to become true, with actions on success or timeout. @param condition The condition to wait for, returning true when met. @retur
src/main/java/org/nanonative/nano/helper/NanoUtils.java:112
↓ 7 callersMethodgenerateUniqueKey
(final String name, final Map<String, String> tags)
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:148
↓ 7 callersMethodhasText
(final String str)
src/main/java/org/nanonative/nano/helper/NanoUtils.java:74
↓ 7 callersMethodisAcknowledged
Indicates whether the event has been acknowledged via {@link #respond(Object)} or {@link #acknowledge()}. @return {@code true} if acknowledged; other
src/main/java/org/nanonative/nano/helper/event/model/Event.java:183
↓ 7 callersMethodnewContext
Creates new Context with a new logger and trace ID. @param clazz The class to use for the logger name. If null, the logger name will be the class of
src/main/java/org/nanonative/nano/core/model/Context.java:355
↓ 7 callersMethodnewTempDir
(final String prefix)
src/test/java/org/nanonative/nano/services/file/FileWatcherTest.java:311
↓ 7 callersMethodpayloadAck
Acknowledges the event and returns the resolved payload. <p> Equivalent to {@code acknowledge().payload()}. @return the payload value
src/main/java/org/nanonative/nano/helper/event/model/Event.java:107
↓ 7 callersMethodrun
Executes a task asynchronously after a specified delay. @param task The task to execute. @param delay The delay before executing the task. @pa
src/main/java/org/nanonative/nano/core/model/Context.java:496
↓ 7 callersMethodsanitizeMetricName
(final String name)
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:156
↓ 7 callersMethodsplitHeaderValue
(final Collection<String> value, final Function<String, R> mapper)
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:1494
↓ 7 callersMethodstartCount
()
src/test/java/org/nanonative/nano/model/TestService.java:84
↓ 7 callersMethodversion
Returns the {@link java.net.http.HttpClient.Version} used by this {@link HttpClient}. @return the {@link java.net.http.HttpClient.Version}
src/main/java/org/nanonative/nano/services/http/HttpClient.java:162
↓ 6 callersMethodacceptEncodings
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:265
↓ 6 callersMethodassertContextBehaviour
(final Context context)
src/test/java/org/nanonative/nano/core/model/ContextTest.java:163
↓ 6 callersMethodbodyAsXml
Returns a string representation of the {@link HttpObject#body()}, decoded using the {@link Charset} from {@link HttpObject#encoding()} specified in th
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:383
↓ 6 callersMethodcontainsEvent
Returns {@code true} if the resolved payload is itself an {@code Event}. @return whether the payload contains a nested event
src/main/java/org/nanonative/nano/helper/event/model/Event.java:248
↓ 6 callersMethodfailures
()
src/test/java/org/nanonative/nano/model/TestService.java:92
↓ 6 callersMethodformat
Formats a log record into a JSON string. @param logRecord The log record to format. @return The log record formatted as a JSON string.
src/main/java/org/nanonative/nano/services/logging/LogFormatterJson.java:50
↓ 6 callersMethodgetGroupOrDefault
Get the group name or default group if none specified
src/main/java/org/nanonative/nano/services/file/FileWatchRequest.java:51
↓ 6 callersMethodhasAccept
(final String... contentTypes)
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:250
next →1–100 of 670, ranked by callers