public.javadoc.org.spincast.core.websocket.WebsocketEndpointManager.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
WebsocketEndpointManager (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.websocket
Interface WebsocketEndpointManager
-
- All Superinterfaces:
- WebsocketEndpointWriter
- All Known Subinterfaces:
- WebsocketEndpoint
- All Known Implementing Classes:
- SpincastWebsocketEndpoint
public interface WebsocketEndpointManager
extends WebsocketEndpointWriter
Manager for a WebSocket endpoint. Extends WebsocketEndpointWriter
since it can write on the endpoint, but also adds some managements
features.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
void
closeEndpoint()
Closes the entire WebSocket endpoint.
void
closeEndpoint(boolean sendClosingMessageToPeers)
Closes the entire WebSocket endpoint.
void
closeEndpoint(int closingCode,
String closingReason)
Closes the entire WebSocket endpoint.
void
closePeer(String peerId)
Closes a specific peer connection on the endpoint.
void
closePeer(String peerId,
int closingCode,
String closingReason)
Closes a specific peer connection on the endpoint.
String
getEndpointId()
The endpoint id
Set<String>
getPeersIds()
The connected peers' ids.
boolean
isClosed()
Is this endpoint closed?
boolean
isClosing()
Is this endpoint closing?
-
Methods inherited from interface org.spincast.core.websocket.WebsocketEndpointWriter
sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageExcept, sendMessageExcept, sendMessageExcept, sendMessageExcept
-
-
Method Detail
-
getEndpointId
String getEndpointId()
The endpoint id
-
closePeer
void closePeer(String peerId)
Closes a specific peer connection on the endpoint.
-
closePeer
void closePeer(String peerId,
int closingCode,
String closingReason)
Closes a specific peer connection on the endpoint.
-
closeEndpoint
void closeEndpoint()
Closes the entire WebSocket endpoint.
All peer connections of this endpoint will be
closed and the endpoint will be removed.
Will try to send a "closing" message to the peers
before closing their connection.
-
closeEndpoint
void closeEndpoint(boolean sendClosingMessageToPeers)
Closes the entire WebSocket endpoint.
All peer connections of this endpoint will be
closed and the endpoint will be removed.
- Parameters:
sendClosingMessageToPeers
- if true
,
Spincast will try to send a "closing" message to the peers
before closing their connections.
-
closeEndpoint
void closeEndpoint(int closingCode,
String closingReason)
Closes the entire WebSocket endpoint.
All peer connections of this endpoint will be
closed and the endpoint will be removed.
Will try to send a "closing" message to the peers
before closing their connection.
-
isClosing
boolean isClosing()
Is this endpoint closing?
-
isClosed
boolean isClosed()
Is this endpoint closed?
Copyright © 2019. All rights reserved.