Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NanoNative/nano
/ functions
Functions
670 in github.com/NanoNative/nano
⨍
Functions
670
◇
Types & classes
61
↓ 178 callers
Method
of
Create a file change event without group information
src/main/java/org/nanonative/nano/services/file/FileChangeEvent.java:24
↓ 156 callers
Method
context
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 callers
Method
filter
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 callers
Method
send
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 callers
Method
header
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 callers
Method
waitForStop
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 callers
Method
path
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 callers
Method
newEvent
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 callers
Method
gaugeSet
(final String name, final double value)
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:64
↓ 61 callers
Method
stop
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 callers
Method
headerMap
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 callers
Method
body
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 callers
Method
statusCode
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 callers
Method
value
()
src/main/java/org/nanonative/nano/services/http/model/ContentType.java:41
↓ 47 callers
Method
put
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 callers
Method
putR
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 callers
Method
size
<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 callers
Method
equals
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 callers
Method
pathMatch
<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 callers
Method
subscribeEvent
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 callers
Method
payload
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 callers
Method
channel
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 callers
Method
hasContentType
(final String... contentTypes)
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:1284
↓ 34 callers
Method
accept
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:224
↓ 34 callers
Method
name
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 callers
Method
bodyAsString
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 callers
Method
contentType
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 callers
Method
registerConfig
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 callers
Method
respond
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 callers
Method
run
()
src/main/java/org/nanonative/nano/helper/ExRunnable.java:5
↓ 28 callers
Method
error
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 callers
Method
shutdown
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 callers
Method
await
(final CountDownLatch latch)
src/test/java/org/nanonative/nano/core/config/TestConfig.java:36
↓ 27 callers
Method
createResponse
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 callers
Method
isReady
Checks whether the instance is ready for operations. @return readiness state.
src/main/java/org/nanonative/nano/core/NanoBase.java:255
↓ 27 callers
Method
methodType
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 callers
Method
tryExecute
(final ExRunnable operation)
src/main/java/org/nanonative/nano/core/model/Context.java:928
↓ 23 callers
Method
payloadOpt
Returns the resolved payload if present. @return optional payload
src/main/java/org/nanonative/nano/helper/event/model/Event.java:116
↓ 22 callers
Method
id
Performs the id operation. @return the result
src/main/java/org/nanonative/nano/core/model/Scheduler.java:43
↓ 21 callers
Method
createCorsResponse
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 callers
Method
address
()
src/main/java/org/nanonative/nano/services/http/HttpServer.java:64
↓ 19 callers
Method
failure
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 callers
Method
nano
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 callers
Method
service
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 callers
Method
bodyAsJson
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 callers
Method
split
(final String input, final String delimiter)
src/main/java/org/nanonative/nano/helper/NanoUtils.java:148
↓ 17 callers
Method
traceId
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 callers
Method
async
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 callers
Method
broadcast
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 callers
Method
writeCfg
(String name, String content)
src/test/java/org/nanonative/nano/core/NanoConfigLoadingTest.java:338
↓ 14 callers
Method
log
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 callers
Method
registerChannelId
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 callers
Method
belongsToGroup
Check if this event belongs to a specific group
src/main/java/org/nanonative/nano/services/file/FileChangeEvent.java:66
↓ 13 callers
Method
forFilesWithGroup
Create a watch request for multiple files with specified group
src/main/java/org/nanonative/nano/services/file/FileWatchRequest.java:44
↓ 12 callers
Method
pollMatching
( final BlockingQueue<FileChangeEvent> queue, final long timeoutMs, final Predicate<Fi
src/test/java/org/nanonative/nano/services/file/FileWatcherTest.java:288
↓ 12 callers
Method
registerChannelId
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 callers
Method
assertWorkingHttpClient
(final HttpClient client)
src/test/java/org/nanonative/nano/services/http/logic/HttpClientTest.java:191
↓ 11 callers
Method
contentTypes
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 callers
Method
putR
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 callers
Method
services
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 callers
Method
acceptLanguages
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:292
↓ 10 callers
Method
accepts
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:229
↓ 10 callers
Method
acknowledge
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 callers
Method
debug
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 callers
Method
getResourcePath
(String resource)
src/test/java/org/nanonative/nano/services/http/HttpServerTest.java:480
↓ 10 callers
Method
isCreate
Check if this is a creation event
src/main/java/org/nanonative/nano/services/file/FileChangeEvent.java:45
↓ 10 callers
Method
sorted
()
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:34
↓ 9 callers
Method
doOnStop
()
src/test/java/org/nanonative/nano/model/TestService.java:127
↓ 9 callers
Method
getEvent
(final Channel<C, R> channel)
src/test/java/org/nanonative/nano/model/TestService.java:47
↓ 9 callers
Method
purgeAllDirs
()
src/test/java/org/nanonative/nano/core/NanoConfigLoadingTest.java:330
↓ 9 callers
Method
send
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 callers
Method
waitFor
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 callers
Method
createRootContext
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 callers
Method
encoding
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 callers
Method
info
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 callers
Method
listeners
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 callers
Method
port
()
src/main/java/org/nanonative/nano/services/http/HttpServer.java:68
↓ 8 callers
Method
putEntry
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 callers
Method
queryParams
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 callers
Method
resolveWallTime
DST-safe wall time: pushes through gaps, picks the earlier offset in overlaps.
src/main/java/org/nanonative/nano/core/NanoThreads.java:203
↓ 8 callers
Method
waitForCondition
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 callers
Method
generateUniqueKey
(final String name, final Map<String, String> tags)
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:148
↓ 7 callers
Method
hasText
(final String str)
src/main/java/org/nanonative/nano/helper/NanoUtils.java:74
↓ 7 callers
Method
isAcknowledged
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 callers
Method
newContext
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 callers
Method
newTempDir
(final String prefix)
src/test/java/org/nanonative/nano/services/file/FileWatcherTest.java:311
↓ 7 callers
Method
payloadAck
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 callers
Method
run
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 callers
Method
sanitizeMetricName
(final String name)
src/main/java/org/nanonative/nano/services/metric/model/MetricCache.java:156
↓ 7 callers
Method
splitHeaderValue
(final Collection<String> value, final Function<String, R> mapper)
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:1494
↓ 7 callers
Method
startCount
()
src/test/java/org/nanonative/nano/model/TestService.java:84
↓ 7 callers
Method
version
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 callers
Method
acceptEncodings
()
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:265
↓ 6 callers
Method
assertContextBehaviour
(final Context context)
src/test/java/org/nanonative/nano/core/model/ContextTest.java:163
↓ 6 callers
Method
bodyAsXml
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 callers
Method
containsEvent
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 callers
Method
failures
()
src/test/java/org/nanonative/nano/model/TestService.java:92
↓ 6 callers
Method
format
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 callers
Method
getGroupOrDefault
Get the group name or default group if none specified
src/main/java/org/nanonative/nano/services/file/FileWatchRequest.java:51
↓ 6 callers
Method
hasAccept
(final String... contentTypes)
src/main/java/org/nanonative/nano/services/http/model/HttpObject.java:250
next →
1–100 of 670, ranked by callers