Package one.microstream.com
Interface ComHost<C>
- All Superinterfaces:
Runnable
- All Known Implementing Classes:
ComHost.Default
public interface ComHost<C> extends Runnable
Host type to listen for new connections and relay them to logic for further processing,
potentially in another, maybe even dedicated thread.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ComHost.Default<C>
-
Method Summary
Modifier and Type Method Description void
acceptConnections()
Listens for incoming connections and relays them for processing.InetSocketAddress
address()
static <C> ComHostCreator<C>
Creator()
boolean
isRunning()
static <C> ComHost<C>
New(InetSocketAddress address, ComConnectionHandler<C> connectionHandler, ComConnectionAcceptor<C> connectionAcceptor)
ComProtocolProvider<C>
protocolProvider()
void
run()
void
stop()
-
Method Details
-
address
InetSocketAddress address() -
protocolProvider
ComProtocolProvider<C> protocolProvider() -
acceptConnections
void acceptConnections()Listens for incoming connections and relays them for processing. -
run
void run() -
stop
void stop() -
isRunning
boolean isRunning() -
New
static <C> ComHost<C> New(InetSocketAddress address, ComConnectionHandler<C> connectionHandler, ComConnectionAcceptor<C> connectionAcceptor) -
Creator
-