public interface HttpRestServer extends RestService, org.refcodes.component.ConnectionComponent<Integer>
RestService
to be capable of opening a server socket on the
local host with the provided port number via #open(Integer)
or with
an additional maximum number of connections via open(Integer, int)
.
A HttpRestServer
can be shutdown via Closable.close()
.org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON>
Modifier and Type | Method and Description |
---|---|
void |
open(Integer aPort,
int aMaxConnections)
Opens the HTTP sever connection (socket) at the given port allowing the
given number of maximum connections at the same time.
|
addMediaTypeFactory, onDelete, onGet, onPost, onPut, subscribeObserver
void open(Integer aPort, int aMaxConnections) throws org.refcodes.component.OpenException
aPort
- The port on which to listen for requests.aMaxConnections
- The number of maximum connections at the same timeorg.refcodes.component.OpenException
- thrown in case something went wrong such as the
port being already in use.Copyright © 2016. All rights reserved.