Class JakartaWebSocketVisitor
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.core.util.Toggleable, io.micronaut.inject.visitor.TypeElementVisitor<Object,Object>
The mappers turn the Jakarta annotations into Micronaut ones; this visitor checks what the
runtime cannot recover from and reports it against the source instead of the first handshake:
a server endpoint has a message handler, an endpoint has at most one handler per category,
does not use partial messages, and every class it names in decoders, encoders
or configurator can be instantiated. The ones that are not beans get an introspection
generated, so no reflection is needed to create them.
A @ServerEndpoint is mapped onto @ServerWebSocket. A @ClientEndpoint
maps onto no Micronaut annotation: it is a plain bean whose handlers the lifecycle mappers made
executable, opened through the WebSocketContainer bean with the URI given to
connectToServer. A client has no URI template, so @PathParam is rejected, and
no reason to receive, so @OnMessage is optional.
An endpoint that declares no scope of its own is made a @Prototype, which is the
Jakarta contract of one endpoint instance per connection. A declared scope wins.
- Since:
- 6.2.0
- Author:
- graemerocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
io.micronaut.inject.visitor.TypeElementVisitor.VisitorKind -
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.inject.visitor.TypeElementVisitor.VisitorKindvoidvisitClass(io.micronaut.inject.ast.ClassElement element, io.micronaut.inject.visitor.VisitorContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrderMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabledMethods inherited from interface io.micronaut.inject.visitor.TypeElementVisitor
finish, getClassType, getElementType, getSupportedOptions, query, start, visitConstructor, visitEnumConstant, visitField, visitMethod
-
Constructor Details
-
JakartaWebSocketVisitor
public JakartaWebSocketVisitor()
-
-
Method Details
-
getVisitorKind
-
getSupportedAnnotationNames
-
visitClass
-