Package ch.nolix.core.net.endpoint
Klasse Server
java.lang.Object
ch.nolix.core.net.endpoint.AbstractServer
ch.nolix.core.net.endpoint.Server
- Alle implementierten Schnittstellen:
IServer,Closeable,CloseStateRequestable,GroupCloseable,Clearable,EmptinessRequestable,AutoCloseable
A
Server is a AbstractServer that listens to
AbstractNetEndPoint on a specific port.
A Server supports the WebSocket protocol and can communicate with a
WebSocket.- Version:
- 2016-01-01
- Autor:
- Silvan Wyss
-
Feldübersicht
Felder -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Serverstatic ServerforPort(int port) static ServerforPortAndInitialHttpMessage(int port, String initialHttpMessage) intgetPort()voidLets the currentGroupCloseablenote a close.Von Klasse geerbte Methoden ch.nolix.core.net.endpoint.AbstractServer
addDefaultSlot, addSlot, clear, containsDefaultSlot, containsSlotWithName, getStoredCloseController, isEmpty, removeSlotByNameVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.closecontroller.CloseStateRequestable
isOpenVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.EmptinessRequestable
containsAnyVon Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrol.closecontroller.GroupCloseable
close, createCloseDependencyTo, isClosed
-
Felddetails
-
DEFAULT_INITIAL_HTTP_MESSAGE
- Siehe auch:
-
-
Methodendetails
-
forHttpPort
- Gibt zurück:
- a new
Serverthat will listen toAbstractNetEndPoints on the HTTP port (80).
-
forPort
- Parameter:
port-- Gibt zurück:
- a new
Serverthat will listen toAbstractNetEndPoints on the given port. - Löst aus:
ArgumentIsOutOfRangeException- if the given port is not in [0, 65535].
-
forPortAndInitialHttpMessage
- Parameter:
port-initialHttpMessage-- Gibt zurück:
- a new
Serverthat will listen toAbstractNetEndPoints on the given port. When a web browser connects to theServer, theServerwill send the given initialHttpMessage to the web browser and close the connection. - Löst aus:
ArgumentIsOutOfRangeException- if the given port is not in [0, 65535].ArgumentIsNullException- if the given initialHttpMessage is null.InvalidArgumentException- if the given initialHttpMessage is blank.
-
getInitialHttpMessage
- Gibt zurück:
- the initial HTTP message the current
Serverwill send to web browsers.
-
getPort
public int getPort()- Gibt zurück:
- the port of the current
Server.
-
getSecurityMode
-
noteClose
public void noteClose()Lets the currentGroupCloseablenote a close.
-