Package org.spincast.core.websocket
Class WebsocketEndpointToControllerManagerDefault
java.lang.Object
org.spincast.core.websocket.WebsocketEndpointToControllerManagerDefault
- All Implemented Interfaces:
WebsocketEndpointToControllerManager
public class WebsocketEndpointToControllerManagerDefault
extends Object
implements WebsocketEndpointToControllerManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEndpointController
(String endpointId, WebsocketController<?, ?> controller) Adds a link between a WebSocket endpoint and a controller.protected String
createControllerKey
(WebsocketController<?, ?> controller) boolean
isManagingEndpoint
(String endpointId, WebsocketController<?, ?> controller) Is the specified controller currently the manager of the endpoint?void
removeEndpointController
(String endpointId) Removes the link between a WebSocket endpoint and a controller.
-
Constructor Details
-
WebsocketEndpointToControllerManagerDefault
public WebsocketEndpointToControllerManagerDefault()
-
-
Method Details
-
getEndpointToControllerMap
-
createControllerKey
-
addEndpointController
public void addEndpointController(String endpointId, WebsocketController<?, ?> controller) throws WebsocketEndpointAlreadyManagedByAnotherControllerExceptionDescription copied from interface:WebsocketEndpointToControllerManager
Adds a link between a WebSocket endpoint and a controller. Only this controller will be able to manage the endpoint.- Specified by:
addEndpointController
in interfaceWebsocketEndpointToControllerManager
- Throws:
WebsocketEndpointAlreadyManagedByAnotherControllerException
-
removeEndpointController
Description copied from interface:WebsocketEndpointToControllerManager
Removes the link between a WebSocket endpoint and a controller.- Specified by:
removeEndpointController
in interfaceWebsocketEndpointToControllerManager
-
isManagingEndpoint
Description copied from interface:WebsocketEndpointToControllerManager
Is the specified controller currently the manager of the endpoint?- Specified by:
isManagingEndpoint
in interfaceWebsocketEndpointToControllerManager
-