public interface ClientConnectionManager
extends com.google.common.util.concurrent.Service
A generic interface for an object which keeps track of a set of open client connections, creates new ones and ensures they are serviced properly.
When the service is com.google.common.util.concurrent.Service#stop()
ed, all connections will be closed and
the appropriate connectionClosed() calls must be made.
Modifier and Type | Method and Description |
---|---|
void |
closeConnections(int n)
Closes n peer connections
|
int |
getConnectedClientCount()
Gets the number of connected peers
|
com.google.common.util.concurrent.ListenableFuture<SocketAddress> |
openConnection(SocketAddress serverAddress,
StreamConnection connection)
Creates a new connection to the given address, with the given connection used to handle incoming data.
|
com.google.common.util.concurrent.ListenableFuture<SocketAddress> openConnection(SocketAddress serverAddress, StreamConnection connection)
int getConnectedClientCount()
void closeConnections(int n)
Copyright © 2018. All rights reserved.