|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vertx.groovy.core.http.HttpServer
abstract class HttpServer
An HTTP and WebSockets server
If an instance is instantiated from an event loop then the handlers of the instance will always be called on that same event loop. If an instance is instantiated from some other arbitrary Java thread then an event loop will be assigned to the instance and used when any of its handlers are called.
Instances cannot be used from worker verticles
Field Summary | |
---|---|
protected HttpServer |
jServer
|
Method Summary | |
---|---|
void
|
close(groovy.lang.Closure hndlr)
Close the server. |
void
|
close()
Close the server. |
java.lang.Integer
|
getAcceptBacklog()
@return The accept backlog |
java.lang.String
|
getKeyStorePassword()
@return The keystore password |
java.lang.String
|
getKeyStorePath()
@return The path to the key store |
java.lang.Integer
|
getReceiveBufferSize()
@return The TCP receive buffer size |
groovy.lang.Closure
|
getRequestHandler()
Get the request handler return The request handler |
java.lang.Integer
|
getSendBufferSize()
@return The TCP send buffer size |
java.lang.Integer
|
getTrafficClass()
@return the value of TCP traffic class |
java.lang.String
|
getTrustStorePassword()
@return The trust store password |
java.lang.String
|
getTrustStorePath()
@return The trust store path |
groovy.lang.Closure
|
getWebsocketHandler()
Get the websocket handler return The websocket handler |
java.lang.Boolean
|
isReuseAddress()
@return The value of TCP reuse address |
boolean
|
isSSL()
@return true if this server will make SSL connections |
java.lang.Boolean
|
isSoLinger()
@return the value of TCP so linger |
java.lang.Boolean
|
isTCPKeepAlive()
@return true if TCP keep alive is enabled |
java.lang.Boolean
|
isTCPNoDelay()
@return true if Nagle's algorithm is disabled. |
HttpServer
|
listen(int port)
Tell the server to start listening on all available interfaces and port port |
HttpServer
|
listen(int port, java.lang.String host)
Tell the server to start listening on port port and hostname or ip address given by host. |
HttpServer
|
requestHandler(groovy.lang.Closure hndlr)
Set the request handler for the server to {code requestHandler}. |
HttpServer
|
setAcceptBacklog(int backlog)
Set the accept backlog |
HttpServer
|
setClientAuthRequired(boolean required)
Set required to true if you want the server to request client authentication from any connecting clients. |
HttpServer
|
setKeyStorePassword(java.lang.String pwd)
Set the password for the SSL key store. |
HttpServer
|
setKeyStorePath(java.lang.String path)
Set the path to the SSL key store. |
HttpServer
|
setReceiveBufferSize(int size)
Set the TCP receive buffer size for connections created by this instance to size in bytes. |
HttpServer
|
setReuseAddress(boolean reuse)
Set the TCP reuseAddress setting for connections created by this instance to reuse. |
HttpServer
|
setSSL(boolean ssl)
If ssl is true, this signifies that any connections will be SSL connections. |
HttpServer
|
setSendBufferSize(int size)
Set the TCP send buffer size for connections created by this instance to size in bytes. |
HttpServer
|
setSoLinger(boolean linger)
Set the TCP soLinger setting for connections created by this instance to linger. |
HttpServer
|
setTCPKeepAlive(boolean keepAlive)
Set the TCP keepAlive setting for connections created by this instance to keepAlive. |
HttpServer
|
setTCPNoDelay(boolean tcpNoDelay)
If tcpNoDelay is set to true then Nagle's algorithm will turned off for the TCP connections created by this instance. |
HttpServer
|
setTrafficClass(int trafficClass)
Set the TCP trafficClass setting for connections created by this instance to trafficClass. |
HttpServer
|
setTrustStorePassword(java.lang.String pwd)
Set the password for the SSL trust store. |
HttpServer
|
setTrustStorePath(java.lang.String path)
Set the path to the SSL trust store. |
HttpServer
|
toJavaServer()
|
HttpServer
|
websocketHandler(groovy.lang.Closure hndlr)
Set the websocket handler for the server to {code wsHandler}. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected HttpServer jServer
Method Detail |
---|
void close(groovy.lang.Closure hndlr)
void close()
java.lang.Integer getAcceptBacklog()
java.lang.String getKeyStorePassword()
java.lang.String getKeyStorePath()
java.lang.Integer getReceiveBufferSize()
groovy.lang.Closure getRequestHandler()
java.lang.Integer getSendBufferSize()
java.lang.Integer getTrafficClass()
java.lang.String getTrustStorePassword()
java.lang.String getTrustStorePath()
groovy.lang.Closure getWebsocketHandler()
java.lang.Boolean isReuseAddress()
boolean isSSL()
java.lang.Boolean isSoLinger()
java.lang.Boolean isTCPKeepAlive()
java.lang.Boolean isTCPNoDelay()
HttpServer listen(int port)
HttpServer listen(int port, java.lang.String host)
HttpServer requestHandler(groovy.lang.Closure hndlr)
HttpServer setAcceptBacklog(int backlog)
HttpServer setClientAuthRequired(boolean required)
HttpServer setKeyStorePassword(java.lang.String pwd)
HttpServer setKeyStorePath(java.lang.String path)
The SSL key store is a standard Java Key Store, and should contain the server certificate.
HttpServer setReceiveBufferSize(int size)
HttpServer setReuseAddress(boolean reuse)
HttpServer setSSL(boolean ssl)
HttpServer setSendBufferSize(int size)
HttpServer setSoLinger(boolean linger)
HttpServer setTCPKeepAlive(boolean keepAlive)
HttpServer setTCPNoDelay(boolean tcpNoDelay)
HttpServer setTrafficClass(int trafficClass)
HttpServer setTrustStorePassword(java.lang.String pwd)
HttpServer setTrustStorePath(java.lang.String path)
The trust store is a standard Java Key Store, and should contain the certificates of any clients that the server trusts - this is only necessary if client authentication is enabled.
HttpServer toJavaServer()
HttpServer websocketHandler(groovy.lang.Closure hndlr)
Groovy Documentation