Class Server
java.lang.Object
ch.nolix.base.net.level3server.AbstractServer
ch.nolix.base.net.level3server.Server
- All Implemented Interfaces:
IServer, Closeable, CloseStateRequestable, GroupCloseable, Clearable, EmptinessRequestable, AutoCloseable
- Author:
- Silvan Wyss
-
Method Summary
Methods inherited from class AbstractServer
addDefaultSlot, addSlot, clear, containsDefaultSlot, containsSlotWithName, getStoredCloseController, isEmpty, noteClose, removeSlotByNameMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseStateRequestable
isOpenMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, isClosed
-
Method Details
-
forPort
- Parameters:
port-- Returns:
- a new
Serverthat will listen toNetEndPoints on the given port. - Throws:
RuntimeException- if the given port is not in [0, 65535].
-
forPortAndHttpMessage
- Parameters:
port-httpMessage-- Returns:
- a new
Serverthat will listen toNetEndPoints on the given port. When a web browser connects to theServer, theServerwill send the given httpMessage and close the connection. - Throws:
RuntimeException- if the given port is not in [0, 65535].RuntimeException- if the given httpMessage is null.RuntimeException- if the given httpMessage is blank.
-
getPort
public int getPort()- Returns:
- the port of the current
Server.
-
getSecurityMode
-