Package com.github.ambry.rest
Interface NioServer
-
public interface NioServer
Represents a NIO (non blocking I/O) server. Responsible for all network communication i.e. receiving requests and sending responses and supports doing these operations in a non-blocking manner. A typical implementation of a NioServer will handle incoming connections from clients, decode the REST protocol (usually HTTP), convert them to generic objects that theRestRequestService
can understand, instantiate a NioServer specific implementation ofRestResponseChannel
to return responses to clients and push them down the pipeline. The NioServer should be non-blocking while receiving requests and sending responses. It should also provide methods that the downstream can use to control the flow of data towards theRestRequestService
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
shutdown()
Do shutdown tasks for the NioServer.void
start()
Do startup tasks for the NioServer.
-
-
-
Method Detail
-
start
void start() throws java.lang.InstantiationException
Do startup tasks for the NioServer. When the function returns, startup is FULLY complete.- Throws:
java.lang.InstantiationException
- if the NioServer is unable to start.
-
shutdown
void shutdown()
Do shutdown tasks for the NioServer. When the function returns, shutdown is FULLY complete.
-
-