Class CoreNativeImageMetadataProvider
- All Implemented Interfaces:
NativeImageMetadataProvider
atmosphere-runtime itself needs in a native image.
Covers the framework's own by-name lookups: broadcasters and their caches,
the default interceptor chain, annotation processors, websocket protocols and
async-support implementations — all selected through init-params and loaded
with IOUtils.loadClass, none of them reachable by static analysis.
The ServiceLoader files matter as much as the classes.
Injectable implementations are discovered rather than referenced, so if the
file is dropped from the image the framework finds nothing to inject and
reports no error — the same silent shape as the bugs this SPI exists to
prevent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionname()Identifier for logs and the generated metadata's provenance comment.intpriority()Runs first so the framework's own types lead the generated metadata.Fully-qualified names of types that are constructed, inspected or invoked reflectively — typically anything selected by an init-param or read from aServiceLoaderfile.Resource patterns that must survive into the image —ServiceLoaderfiles above all, since a missing one turns a discovered implementation into a silently absent one.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.atmosphere.nativeimage.NativeImageMetadataProvider
isAvailable, typeReachedCondition
-
Constructor Details
-
CoreNativeImageMetadataProvider
public CoreNativeImageMetadataProvider()
-
-
Method Details
-
name
Description copied from interface:NativeImageMetadataProviderIdentifier for logs and the generated metadata's provenance comment.- Specified by:
namein interfaceNativeImageMetadataProvider
-
priority
public int priority()Runs first so the framework's own types lead the generated metadata.- Specified by:
priorityin interfaceNativeImageMetadataProvider- Returns:
- the priority, default
0
-
reflectiveTypes
Description copied from interface:NativeImageMetadataProviderFully-qualified names of types that are constructed, inspected or invoked reflectively — typically anything selected by an init-param or read from aServiceLoaderfile.Names rather than
Classliterals: a provider must be able to declare a type from an optional dependency without forcing that dependency to be present, which is the same reason the framework's ownAtmosphereReflectiveTypesis a list of strings.- Specified by:
reflectiveTypesin interfaceNativeImageMetadataProvider- Returns:
- type names, never
null
-
resourcePatterns
Description copied from interface:NativeImageMetadataProviderResource patterns that must survive into the image —ServiceLoaderfiles above all, since a missing one turns a discovered implementation into a silently absent one.- Specified by:
resourcePatternsin interfaceNativeImageMetadataProvider- Returns:
- patterns understood by GraalVM's resource configuration, never
null
-