Class DefaultServer
java.lang.Object
com.soklet.core.impl.DefaultServer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder used to construct instances ofDefaultServer.Nested classes/interfaces inherited from interface com.soklet.core.Server
Server.RequestHandler -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(SokletConfiguration sokletConfiguration, Server.RequestHandler requestHandler) Is this server started (that is, able to handle requests from clients)?voidstart()Starts the server, which makes it able to accept requests from clients.voidstop()Stops the server, which makes it unable to accept requests from clients.static DefaultServer.Builder
-
Method Details
-
withPort
-
start
-
stop
-
isStarted
-
initialize
public void initialize(@Nonnull SokletConfiguration sokletConfiguration, @Nonnull Server.RequestHandler requestHandler) Description copied from interface:ServerTheSokletinstance which manages thisServerwill invoke this method exactly once at initialization time - this allowsSokletto "talk" to yourServer.This method is designed for internal use by
Sokletonly and should not be invoked elsewhere.- Specified by:
initializein interfaceServer- Parameters:
sokletConfiguration- configuration for the Soklet instance that controls this serverrequestHandler- aSoklet-internal request handler which takes aServer-provided request as input and supplies aMarshaledResponseas output for theServerto write back to the client
-