Package io.micronaut.websocket.context
Interface WebSocketBeanRegistry
public interface WebSocketBeanRegistry
Registry for WebSocket beans.
- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketBeanRegistry
forClient
(BeanContext beanContext) Create aWebSocketBeanRegistry
from the given bean context.static WebSocketBeanRegistry
forServer
(BeanContext beanContext) Create aWebSocketBeanRegistry
from the given bean context.<T> WebSocketBean<T>
getWebSocket
(Class<T> type) Retrieves aWebSocketBean
.
-
Field Details
-
EMPTY
An empty registry.
-
-
Method Details
-
getWebSocket
Retrieves aWebSocketBean
.- Type Parameters:
T
- The generic type- Parameters:
type
- The type- Returns:
- The
WebSocketBean
- Throws:
NoSuchBeanException
- if the bean doesn't exist
-
forServer
Create aWebSocketBeanRegistry
from the given bean context.- Parameters:
beanContext
- The bean context- Returns:
- The
WebSocketBeanRegistry
-
forClient
Create aWebSocketBeanRegistry
from the given bean context.- Parameters:
beanContext
- The bean context- Returns:
- The
WebSocketBeanRegistry
-