Package ch.nolix.core.net.endpoint
Klasse Server
java.lang.Object
ch.nolix.core.net.endpoint.BaseServer
ch.nolix.core.net.endpoint.Server
- Alle implementierten Schnittstellen:
IServer
,Closeable
,CloseStateRequestable
,GroupCloseable
,Clearable
,EmptinessRequestable
,AutoCloseable
A
Server
is a BaseServer
that listens to NetEndPoint
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
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Server
static Server
forPort
(int port) static Server
forPortAndInitialHttpMessage
(int port, String initialHttpMessage) int
getPort()
void
Lets the currentGroupCloseable
note a close.Von Klasse geerbte Methoden ch.nolix.core.net.endpoint.BaseServer
addDefaultSlot, addSlot, clear, containsDefaultSlot, containsSlotWithName, getStoredCloseController, isEmpty, removeSlotByName
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.CloseStateRequestable
isOpen
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAny
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.resourcecontrolapi.resourceclosingapi.GroupCloseable
close, createCloseDependencyTo, isClosed
-
Felddetails
-
DEFAULT_INITIAL_HTTP_MESSAGE
- Siehe auch:
-
-
Methodendetails
-
forHttpPort
- Gibt zurück:
- a new
Server
that will listen toNetEndPoint
s on the HTTP port (80).
-
forPort
- Parameter:
port
-- Gibt zurück:
- a new
Server
that will listen toNetEndPoint
s 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
Server
that will listen toNetEndPoint
s on the given port. When a web browser connects to theServer
, theServer
will 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
Server
will send to web browsers.
-
getPort
public int getPort()- Gibt zurück:
- the port of the current
Server
.
-
getSecurityMode
-
noteClose
public void noteClose()Lets the currentGroupCloseable
note a close.
-