Interface WebSocketMapping
-
- All Superinterfaces:
ContextRelated
public interface WebSocketMapping extends ContextRelated
WebSocket mapping contains all the information required to register a WebSocket. Because the WebSockets (JSR-356) don't have to implement any specific interface or extend any specific class, we have much more flexibility and responsibility here.
On purpose, we don't allow registration of other objects that usually can be passed (by means of
HandlesTypes
annotation on aServletContainerInitializer
related to WebSockets) by users. Only annontated classes or actual instances are handled and we don't support:javax.websocket.server.ServerApplicationConfig
javax.websocket.Endpoint
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getWebSocketAnnotatedEndpoint()
Returns an instance of a class annotated with@javax.websocket.server.ServerEndpoint
.Class<?>
getWebSocketClass()
Returns aClass
of the WebSocket endpoint that should be annotated with@javax.websocket.server.ServerEndpoint
annotation.-
Methods inherited from interface org.ops4j.pax.web.service.whiteboard.ContextRelated
getContextId, getContextSelectFilter
-
-
-
-
Method Detail
-
getWebSocketClass
Class<?> getWebSocketClass()
Returns aClass
of the WebSocket endpoint that should be annotated with@javax.websocket.server.ServerEndpoint
annotation. If both the object (getWebSocketAnnotatedEndpoint()
) and the class is specified, the class takes precedence.- Returns:
-
getWebSocketAnnotatedEndpoint
Object getWebSocketAnnotatedEndpoint()
Returns an instance of a class annotated with@javax.websocket.server.ServerEndpoint
. If both the object and the class (getWebSocketClass()
) is specified, the class takes precedence.- Returns:
-
-